iOS:App审核被拒之Your app also uses the "prefs:root=" non-public URL scheme, which is a private entity...

参考文章:记录AppStore审核被拒绝经历

prefs:root 上架被拒问题

收到的被拒信息为

Your app also 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.

原因是用到了私有api,跳转至设置的api.

1. 全局搜索prefs:root

查到有以下引用方法等

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=Privacy"]];//隐私设置

苹果的要求是不可以再使用prefs:root以及App-Prefs:root的接口来做app内部和系统设置的跳转了。现在做app系统设置跳转,官方的只能使用UIApplicationOpenSettingURLString.

并且,明确一点,就是打开url的api也是需要做适配的。
iOS10以下

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];

iOS10及以上

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] options:@{} completionHandler:nil];

2. 使用命令行检索私有api

1.打开中断,cd到要检索的工程目录
2.分别输入以下命令行,来找到使用了(私有API)的SDK或者.a的静态库:

find . | grep -v .svn | grep "\.a" | grep -v "\.app" | xargs grep 【私有API】
grep -lr "【私有API】" * | grep -v .svn | grep -v .md

3.根据终端提示修改代码

你可能感兴趣的:(iOS:App审核被拒之Your app also uses the "prefs:root=" non-public URL scheme, which is a private entity...)