[英]App is rejected use of non-public URL scheme, which is a private entity
Your app uses the "prefs:root=" non-public URL scheme, which is a private entity.
您的应用程序使用“prefs:root=”非公共 URL 方案,这是一个私有实体。 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.
App Store 不允许使用非公共 API,因为如果这些 API 发生变化,可能会导致糟糕的用户体验。
If user off the location service then what we do??如果用户关闭位置服务,那我们怎么办?? because app required user's location.
因为应用程序需要用户的位置。
You can't use the non-public URL schemes in your app.您不能在您的应用中使用非公开 URL 方案。 If you do, Apple will reject your app for the security and privacy reason.
如果您这样做,Apple 将出于安全和隐私原因拒绝您的应用程序。 If you continue to do same, it will lead to permanently disable your apple developer account.
如果您继续这样做,它将导致您的苹果开发者帐户永久禁用。
For the user location, you can always check for the permission for location either user has give it or not.对于用户位置,您始终可以检查用户是否授予位置权限。 And based on the user action you can take the further actions.
根据用户操作,您可以采取进一步的操作。
How to check location permission如何查看位置权限
import CoreLocation
Create location manager as property创建位置管理器作为属性
var locationManager = CLLocationManager()
Request for the location permission.请求位置许可。
locationManager.desiredAccuracy = kCLLocationAccuracyBest
locationManager.delegate = self
locationManager.requestAlwaysAuthorization()
locationManager.startUpdatingLocation()
Implement the delegate CLLocationManagerDelegate
to get the location permission.实现委托
CLLocationManagerDelegate
以获取位置权限。
func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) {
switch status {
case .authorizedAlways, .authorizedWhenInUse:
print("User has given location permission...")
//do something
case .denied, .notDetermined, .restricted:
print("Location permission is not given.")
//do something when location permission is not given by user or it can't be determined.
@unknown default:
print("unknown case...")
}
}
Do not forget to add required keys for location permission in Info.plist
file.不要忘记在
Info.plist
文件中添加位置权限所需的密钥。
So in this way you can manage location permission and perform some operation.因此,您可以通过这种方式管理位置权限并执行一些操作。
When you upload app next time you need to remove non-public URL schemes otherwise you will face rejection again.下次上传应用程序时,您需要删除非公开的 URL 方案,否则您将再次面临拒绝。
要解决此问题,请修改您的应用以使用公共 API 提供相关功能,或使用“prefs:root”或“App-Prefs:root”URL 方案移除该功能。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.