私有Api检测

作者: L晨曦 | 来源:发表于2017-12-19 00:09 被阅读66次

早段时间,因为上架问题被拒了,苹果反馈的原因是使用了私有api

Guideline 2.5.1 - Performance - Software Requirements


Your app uses or references the following non-public APIs:

GraphicsServices.framework

The use of non-public APIs is not permitted on the App Store because it can lead to a poor user experience should these APIs change. 

Continuing to use or conceal non-public APIs in future submissions of this app may result in the termination of your Apple Developer account, as well as removal of all associated apps from the App Store.

Next Steps

If you are using third-party libraries, please update to the most recent version of those libraries. If you do not have access to the libraries' source, you may be able to search the compiled binary using the "strings" or "otool" command line tools. The "strings" tool can output a list of the methods that the library calls and "otool -ov" will output the Objective-C class structures and their defined methods. These tools can help you narrow down where the problematic code resides. You could also use the "nm" tool to verify if any third-party libraries are calling these APIs.

Resources

For information on the "nm" tool, please review the "nm tool" Xcode manual page.

If there are no alternatives for providing the functionality your app requires, you can file an enhancement request.

私有api属于这个GraphicsServices.framework库中,然后我全局搜索后发现无法检测到这个库的存在,应该是私有库之类的。

在几经折腾,实在找不到后,联系苹果的技术支持反馈的是使用是下面这个私有api

[UIDevice supportsCapability:]

.a库里面我们是没法全局搜索到的,所以要用到终端全局搜索。
方法有几种,我在查找的时候基本能定位到使用私有api的第三方库的位置

1.cd 到工程的目录
调用全局搜索的命令 [ grep -r supportsCapability .  ] 或者  [ grep -r GraphicsServices .  ]看仔细后面有一点,定位到的是环信的SDK, ,很老的版本,很多很旧的东西,问题就出在这里。、,查到后,替换成最新的SDK就没问题了。
结果.png

再次匹配你私有api已经不存在了

WX20171219-000415@2x.png
2. 第二种方法的具体步骤:

   1、首先你有个可以提交审核的ipa,就是打包的第一个,不是测试的release。

   2、将ipa重命名为zip格式,解压。如果有两个文件夹Payload、Symbols,就OK。

   3、cd到Payload里面的app

   4、有两种方式可以检测打包文件是否包含字符串

            (1) strings - -a -arch armv7 "test" | grep canOpenUrl

            (2)strings - -a -arch armv7 "test" > test.txt

具体可以参考这文章:利用strings 检测iOS ipa包是否调用私有api
http://www.jianshu.com/p/9c16e0878086

两种方法我试过,都可以定位到具体的第三方库位置。


F1FA00A2-1961-4433-941E-7FB5843CE7FD.png
最后总结下思路
1.如果你是项目最近有新添加的第三方库,可以挨个去排查。
2.如果你是像我这样是旧的SDK产生的问题,无从下手,最快捷的方法是联系苹果技术支持,获取到具体的那个私有Api,再全局查找定位。

相关文章

  • iOS私有Api检测

    iOS私有Api检测 iOS私有Api检测

  • 私有API检测

    私有API分类 不成熟的API 苹果已有, 成熟的, 但是不让用的 使用私有API, 可能会被拒 被拒绝原因苹果邮...

  • 私有Api检测

    早段时间,因为上架问题被拒了,苹果反馈的原因是使用了私有api 私有api属于这个GraphicsServices...

  • iOS私有API检测

    1.cd 到项目目录 grep -r prefs . //-r递归检测 prefs你需要检测的私有api方法 ...

  • iOS私有Api检测

    最近提交APP审核, 一直都说是使用了私有API 在网上找了一些检测私有API的方法才发现在SDK里面涉及到了 下...

  • iOS私有Api检测

    最近提交APP审核被苹果的审核人员是虐的不要不要的, 一直都说是使用了私有API 但是我使出了浑身解数, 也没找到...

  • iOS私有Api检测

    个人原文博客地址: iOS私有Api检测 最近提交APP审核被苹果的审核人员是虐的不要不要的, 一直都说是使用了私...

  • iOS 越狱检测

    1 2 3 4 5. 检测链接动态库,检测是否被链接了异常动态库,但动态库相关Api属于私有Api,调⽤的话app...

  • iOS开发私有api检测

    https://github.com/NetEaseGame/iOS-private-api-checker 检测...

  • 检测私有API的使用

    检测私有API的使用 1、使用string命令获取使用的api列表 先archive出来一个可提交审核的ipa包。...

网友评论

  • 午马丶:兄弟可以告诉我 你是这么联系的苹果的技术客服吗? 我这里 也是一直监测不出来

本文标题:私有Api检测

本文链接:https://www.haomeiwen.com/subject/rdvvwxtx.html