关于私有api审核被拒问题解决方案

一、提交审核返回错误信息

     

Guideline 2.5.1 - Performance - Software Requirements

Thank you for your resubmission. However, we noticed that the previous issue has not been resolved. 

Your app uses the "prefs:root=" non-public URL scheme, which is a private entity. 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

To resolve this issue, please revise your app to provide the associated functionality using public APIs or remove the functionality using the "prefs:root" or "App-Prefs:root" URL scheme.

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

Since your App Store Connect status is Rejected, a new binary will be required.

大概意思就是:

您的应用程序使用的是“prefs:root=”非公共URL方案,这是一个私有实体。应用商店不允许使用非公共api,因为如果这些api发生变化,会导致糟糕的用户体验。

继续使用或隐藏非公开的api,在以后提交这个应用程序时,可能会导致你的苹果开发者账户被终止,并从应用商店中删除所有相关的应用。

下一个步骤

要解决这个问题,请修改应用程序,使用公共api提供相关功能,或者使用“prefs:root”或“app - prefs:root”URL方案删除相关功能。

二、删除工程里面的相关使用App-Prefs:的地方

         替换[NSURL URLWithString:UIApplicationOpenSettingsURLString]进入到app的相关设置界面。

    你可以在工程里面进行全工程的搜索“App-Prefs”,屏蔽的也不行查找对应的代码出处。然后进行修改。

    (这里注意:target里面的info->url Types内部的添加项也一并去除)

三,本文主要讲删除所有的了然后还是有问题。

    (其实这个原因,主要出现于工程中使用的第三方文件问题。)

    你会问:这我怎么查?又或者是:这我怎么改?

    如果你是用的cocoapods管理的第三方,更新一下最新的第三方库。不要限定特定的版本号(除非你们项目特别要求)

    对于怎么查找:

这里

1.需要你打开终端:

cd (你要查找项目的文件跟路径)

2.分别输入以下命令行,来找到使用了 (私有API) 的SDK或者.a的静态库:

(查找(遍历)所有的静态库.a  .svn  .app里面是否包含私有API的这个字段)

grep -lr "prefs:root=" * | grep -v .svn | grep -v .md

(过滤 筛选对应有这个私有API的文件在那个包文件内)

然后找到对应的问题包文件,进行替换或者重新打包,或者更新处理。

参考链接 https://blog.csdn.net/BUG_delete/article/details/80879670

链接:https://group.cnblogs.com/topic/79996.html (不好找,搬到随笔这里)

原文地址:https://www.cnblogs.com/ljcgood66/p/14767352.html