iphone - How to detect & avoid the use of private APIs in third party libraries -
Now when Apple is running a steady analysis of some kind of automatic analysis of the private API usage, many people are caught Because I use the other third-party libraries (which I compile myself from the code) of the three libraries and before I submit it to Apple to automatically audit it for automatic API usage, so I want to remove those parts Obtain / write again I can /.
If I run nm
on my application executable, I get a list of symbols, and I see the symbols in there which I do not use. For example, I am looking at _AudioServicesPlaySystemSound, and if I search for "AudioServicesPlaySystemSound" in XCode, I do not get any results. For example, I have a notice that Apple has a habit of giving names with initial underscores. Although
However, if I deliberately add a private API to the call, I do not see it in the output of Does anyone have a suggestion on how to automatically capture this stuff, so I'm going through the review process only once? You can try running nm on object files instead of the executable executable: objects You are seeing a reference to C call will not usually be shown in nm
, but if I have strings on the binary < Based on this code, I have an idea that all the private API calls were to be compiled in a huge table, and searched for them in string output automatically. I have not done so yet.
nm -g -j *. O | Sort | Uniq
build / & lt; App & gt; .build / * / & lt; App & gt; Must be in the .build / object-normal
subdirectory. AudioServicesPlaySystemSound
, because the functions you call call call nm
dump, you must use otool
for it:
Otool -ov & lt; Object file & gt;
Comments
Post a Comment