2011-11-14 34 views
0

我正在使用App Scanner Tool來檢測應用程序中的PRIVATE API使用情況。應用程序掃描儀工具,用於檢測PRIVATE API的使用情況

於網站的指示,我拖着my_application.app文件&工具會掃描私有API的使用 refer the attached screen shot

完成對私有API的掃描它給出了一個huge list! attached is a screen shot for ref後。

這裏列出了第二列中的違規方法簽名。這意味着什麼(這些還包括委託一些委託方法)&我該如何解決它們?我是否需要去類&重命名方法?

+0

沒有辦法像這樣的工具永遠不會準確。他們無法知道所有未公開的私人API。它是蛇油。只需提交你的應用程序,並找出。如果您使用第三方代碼,請閱讀它。千萬不要盲目信任第三方代碼。 – uchuugaka

回答

0

它看起來像它的檢測專用API調用您的第三方庫(MFGridView,MFGridViewCell,KitabooGridCell ...)。我不知道他們如何定義「私人」(如果它只是沒有記錄在標題中的任何功能)。就蘋果而言,這不是一個問題,他們只是不喜歡你調用他們的私有API,因爲他們無法對結果提供任何保證。

+0

我相信MF是Apple在內部使用的前綴。 AppScanner工具可能只是將所有MF前綴的類標記爲私有... –

2

我認爲oTool工作得更好。我與

otool -ov APP.NAME. 

工作更好。 喜歡此信息

0059b058 0x6164a8 
       name 0x57ac94 
       cls 0x0 
    instanceMethods 0x6163c0 
      entsize 12 
      count 17 
       name 0x52b277 getSysInfoByName: 
      types 0x582a3b @[email protected]:4*8 
       imp 0x3f92b5 
       name 0x52b2ba platform 
      types 0x57bc6d @[email protected]:4 
       imp 0x3f9351 
       name 0x52b2eb hwmodel 
      types 0x57bc6d @[email protected]:4 
       imp 0x3f9389 
       name 0x52b289 getSysInfo: 
      types 0x582a45 [email protected]:4I8 
       imp 0x3f93c1 
       name 0x52b2f3 cpuFrequency 
      types 0x57bda8 [email protected]:4 
       imp 0x3f9451 
       name 0x52b300 busFrequency 
      types 0x57bda8 [email protected]:4 
       imp 0x3f9485 
       name 0x52b30d cpuCount 
      types 0x57bda8 [email protected]:4 
       imp 0x3f94b9 
       name 0x52b316 totalMemory 
      types 0x57bda8 [email protected]:4 
       imp 0x3f94ed 
       name 0x52b322 userMemory 
      types 0x57bda8 [email protected]:4 
       imp 0x3f9521 
       name 0x52b32d maxSocketBufferSize 
      types 0x57bda8 [email protected]:4 
       imp 0x3f9555 
       name 0x52b341 totalDiskSpace 
      types 0x57bc6d @[email protected]:4 
       imp 0x3f9589 
       name 0x52b350 freeDiskSpace 
      types 0x57bc6d @[email protected]:4 
       imp 0x3f9639 
       name 0x52b2c3 platformType 
      types 0x57bda8 [email protected]:4 
       imp 0x3f96e9 
       name 0x52b0c4 platformString 
      types 0x57bc6d @[email protected]:4 
       imp 0x3f9e99 
       name 0x52b35e hasRetinaDisplay 
      types 0x57bcf4 [email protected]:4 
       imp 0x3fa0ed 
       name 0x52b36f deviceFamily 
      types 0x57bccf [email protected]:4 
       imp 0x3fa185 
       name 0x52b09a macaddress 
      types 0x57bc6d @[email protected]:4 
       imp 0x3fa2f9 
     classMethods 0x616494