Detecting the use of private APIs

前端 未结 4 928
被撕碎了的回忆
被撕碎了的回忆 2020-12-16 01:58

I\'m being rejected on the App Store for using private instance variables in my app. The ivars I am supposedly using are most definitely not being accessed in my code, but I

相关标签:
4条回答
  • 2020-12-16 02:24

    I don't know anything about detecting the problem, but we encountered this problem recently; in our case it was caused by the Three20 library. If you are using it, see http://groups.google.com/group/three20/browse_thread/thread/c442af6e39a918b0/2375e7a158ee9d1b for a discussion/possible solutions.

    0 讨论(0)
  • 2020-12-16 02:32

    You can use nm to scan for which library uses the ivar in question.

    % nm static_lib.a | grep name_of_ivar
    

    If you get a line, I think with a capital U, with the name of the ivar you probably have a suspect.

    0 讨论(0)
  • 2020-12-16 02:33

    I am using one or two static libs from third parties

    Contact the third parties, requesting explanation, they wrote the code, they must know what's in there. They might have a forum or a comments section, where other users might have expressed these concerns already, and you can look for answers and alternatives.

    0 讨论(0)
  • 2020-12-16 02:34

    For those who have many third-party libraries, can check your project in such a manner in your project path, for example if you want to find GraphicsService:

    $ find . |grep "\\.a" | xargs grep GraphicsService
    
    0 讨论(0)
提交回复
热议问题