我最近向itunes connect上传了我的应用程序的新版本.这个笔记拒绝了我的应用程序
Your app uses the “prefs:root=” non-public URL scheme
我几乎可以肯定我没有在我的应用程序上使用任何Url方案我试过找到prefs:root在我的整个项目中通过终端使用grep -R(不区分大小写也能匹配App-Prefs或其他什么.
我也使用了很多cocoapods库……所以我的问题是……
有没有办法找出哪个库正在使用该权限?
我项目中使用的框架:
> AmazonFling
>来自CocoaPods的许多其他人(未列出因为不相关:请参阅我的回答)
解决方法
我遇到了与Apple相同的拒绝并打开应用程序设置,我使用的是以下代码,并且在iOS11上不接受.
- let url = URL(string : "prefs:root=")
- if UIApplication.shared.canOpenURL(url!) {
- UIApplication.shared.openURL(url!)
- }
因此,要打开“设置”,我使用了以下代码,App已获批准.
- guard let settingsUrl = URL(string: UIApplicationOpenSettingsURLString) else {
- return
- }
- if UIApplication.shared.canOpenURL(settingsUrl) {
- if #available(iOS 10.0,*) {
- UIApplication.shared.open(settingsUrl,completionHandler: { (success) in
- })
- }
- else {
- UIApplication.shared.openURL(settingsUrl)
- }
- }