美文网首页
iOS审核 2.5.1礼包 -- PrivateFramewo

iOS审核 2.5.1礼包 -- PrivateFramewo

作者: iOS_Jaye | 来源:发表于2018-05-03 13:43 被阅读209次

    今天集团的另个一App也收到了一样的问题,但是苹果的回复明确说明是在低版本上调用了WebKit,造成安全隐患。so,还是老老实实升级iOS8或者只用UIWebView吧。


    今天苹果审核收到了一个2.5.1大礼包,苹果回复如下

    最新回复如下

    Guideline 2.5.1 - Performance - Software Requirements

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

    WebKit.frameworkwith a minimum OS from before WebKit was made public.

    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.

    看报的错,说我们调用了WebKit的私有API。按照他的提示,使用 otool 工具,对二进制包进行分析,也是提示引入PrivateFramework。 

    分析代码如下

    分析代码

    其中确实有说WebKit是从私有库引入的。这样就很奇怪了,WebKit什么时候变成私有库了?

    带着这个疑问,goole了下,果然有点线索

    https://stackoverflow.com/questions/25897123/including-webkit-framework-for-ios8-fails-validation

    如链接里的所说,在支持iOS7的情况下,引入WKWebView会报错,而最低版本支持iOS8就不会。结合自己本身业务,也确实是这样处理的,我们的app任旧在支持iOS7,在iOS8以下使用UIWebView,在iOS8及以上使用WKWebView,也一直这么使用,从来没出什么问题。

    根据这个信息,进行了以下测试:

    1、先取消项目里相关的WebKit引用,代码里全部使用UIWebView,打出的包再进行otool -L分析,确实再没有如上图一样的PrivateFrameworks字条。

    2、代码里取消WebKit引用,但是在配置里引入WebKit.framework,otool -L分析后如上图一样,提示PrivateFrameworks

    3、代码不做处理,将最低版本支持从iOS7.0提升到iOS8.0,otool -L分析后也是没有PrivateFrameworks提示

    结论很明显,是在支持了iOS7并引入了WebKit库之后才会出现的问题。

    结论:

    这里有几个解决方案供参考

    1、将最低版本支持提升到iOS8

    2、如果业务里嵌入不深的话,可以考虑取消WKWebview的引用,任旧使用UIWebView

    3、跟苹果审核申诉

    第三条我自己本身也没试过,不确定能不能行。但是按照逻辑这个不是因为我们主动调用私有api造成的问题,有理由进行申诉。

    PS:

    在这次拒审之前,我们也接收到了另一个5.2.1,不确定这次新的问题是不是上次的延伸。因为重来没有出现过认为WebKit是私有库的报错。

    之前的问题是调用了

    WebActionDisablingCALayerDelegate,PrivateFrameworks/WebKit.framework

    来解决WebView在有些系统上偶现的crash问题,这个确实是私有接口。但是之前很长一段时间内是正常提审的。

    相关文章

      网友评论

          本文标题:iOS审核 2.5.1礼包 -- PrivateFramewo

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