收到的被拒信息為
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,跳轉(zhuǎn)至設(shè)置的api.
1. 全局搜索prefs:root
查到有以下引用方法等
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=Privacy"]];//隱私設(shè)置
蘋果的要求是不可以再使用prefs:root以及App-Prefs:root的接口來做app內(nèi)部和系統(tǒng)設(shè)置的跳轉(zhuǎn)了。現(xiàn)在做app系統(tǒng)設(shè)置跳轉(zhuǎn)超棺,官方的只能使用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的靜態(tài)庫:
find . | grep -v .svn | grep "\.a" | grep -v "\.app" | xargs grep 【私有API】
grep -lr "【私有API】" * | grep -v .svn | grep -v .md
3.根據(jù)終端提示修改代碼