iOS审核因 "prefs:root="被拒解决办法

苹果反馈被拒原因:
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.
Specifically, your app uses the following non-public URL scheme:
prefs:root=com.rct.buyer
app-prefs:root=com.rct.buyer
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.

项目中代码:
 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=com.rct.buyer"]];
修改为:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];

百度了一大圈都是说找到工程里面的相关使用App-Prefs:,然后删除就OK了,替换为Apple提供的api:UIApplicationOpenSettingsURLString跳转到设置即可;
但是如果搜索并未发现任何相关代码,考虑可能问题出现在第三方的.a或者.framework文件中
可以使用命令行来查找工程中的私有api“App-Prefs”
命令为:grep -lr "prefs:root=" *

你可能感兴趣的:(iOS审核因 "prefs:root="被拒解决办法)