Use nm, strings and / or otool to find which library mistakenly uses frameworks or methods

I had the same problem as in question .

The solution does not discuss, however, how nm , strings or otool can be used to find violating code.

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

  • Specifically, how can one look for binary libraries using nm , strings or otool ?

  • Why is there no linker error, although AdSupport.framework not in the build phase of Link Binary With libraries or linked through OTHER_LDFLAGS ?

Edit:

After debugging many projects, I realized that the best way to check if the framework is used (and where) is simply trying to create a target without linking the framework in the assembly phases or using OTHER_LDFLAGS .

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

If it passes, you can explain to Apple that the structure is not used when a string search appears. This worked to get our applications accepted.

+3
ios linker app-store
04 Feb '14 at 6:11
source share
2 answers

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

 nm libxxx.a 

Additional options and grep can be added for reference.

0
Feb 07 '14 at 1:23
source share

After debugging many projects, I realized that the best way to check if the framework is used (and where) is simply trying to create a target without linking the framework in the assembly phases or using OTHER_LDFLAGS .

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

If it passes, you can explain to Apple that the structure is not used when a string search appears. This worked to get our applications accepted.

0
Feb 14 '14 at 10:12
source share



All Articles