使用纳米,字符串和/或otool找到哪个库被错误使用的模式或方法 [英] Use nm, strings and/or otool to find which library is wrongly using frameworks or methods

查看:337
本文介绍了使用纳米,字符串和/或otool找到哪个库被错误使用的模式或方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有同样的问题,因为在这个<一个href=\"http://stackoverflow.com/questions/21178533/app-store-submission-denied-ios-advertising-identifier\">question.

I had the same problem as in this question.

解决方案不但是讨论如何纳米字符串 otool 可用于搜索犯罪code。

The solution doesn't discuss however how nm, strings or otool can be used to search for offending code.

让说,从<$ C $违规code使用的 ASIdentifierManager advertisingIdentifier 方法C> AdSupport.framework程式。

Let say that the offending code uses ASIdentifierManager's advertisingIdentifier method from the AdSupport.framework.


  • 具体而言,如何二进制库与纳米字符串搜索 otool

怎么会没有,即使 AdSupport.framework程式不是的一部分链接二进制与图书馆建设阶段或通过<$ C链接链接错误$ C> OTHER_LDFLAGS ?

How come there is no linker error even though AdSupport.framework is not part of the "Link Binary With libraries" build phase or linked through OTHER_LDFLAGS?

编辑:

调试很多项目之后,我意识到,要检查的最佳方式,如果(在哪里)的框架采用的是简单地试图建立目标不链接的框架没有在你的构建阶段,或者使用 OTHER_LDFLAGS

After debugging many projects I realized that the best way to check if (and where) a framework is used is simply trying to build the target without linking the framework neither in your Build Phases or using OTHER_LDFLAGS.

如果链接失败,你将有类负责使用它的名字和图书馆。

If the linker fails you'll have the name of the class and library responsible for using it.

如果通过,那么你可以到苹果公司解释,该框架不被使用的渴望展示自己的字符串搜索起来。这个工作对我们的应用程序以获得接受。

If it passes then you can explain to Apple that the framework is not being used desire showing up on their string searches. This worked for our applications to get accepted.

推荐答案

首先,你应该找到的lib项目中使用,如libxxx.a(libxxx.o)。然后使用纳米/ otool /串,像

First of all, you should find the lib your project use, like libxxx.a(libxxx.o). Then use nm/otool/strings,like


nm libxxx.a

其他参数和grep可以添加供大家参考。

Additional parameters and grep can be added for your reference.

这篇关于使用纳米,字符串和/或otool找到哪个库被错误使用的模式或方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆