简体   繁体   English

应用程序被拒绝使用非公开 URL 方案,这是一个私人实体

[英]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.

相关问题 iOS应用程序被拒绝:非公共API - iOS App Rejected : non-public APIs iOS应用程序被拒绝:应用程序使用或引用非公共API - iOS App Rejected: app uses or references non-public APIs ios app store rejection - 您的应用使用“prefs:root =”非公共URL方案 - ios app store rejection - Your app uses the “prefs:root=” non-public URL scheme 应用拒绝问题2.5.1:使用非公开API的应用将被拒绝(自iOS10起) - App rejection issue 2.5.1: Apps that use non-public APIs will be rejected (Since iOS10) Unity,Vuforia iOs的应用程序因非公开API而被拒绝 - Unity, Vuforia iOs 'App rejected Due to Non-public API' 离子v1科尔多瓦“ prefs:root =”非公共URL方案iOS应用拒绝 - Ionic v1 Cordova “prefs:root=” non-public URL scheme ios app rejection 苹果因非公开API跳板而拒绝了我的应用 - Apple rejected my app because of non-public APIs springboard 使用非公开API LSApplicationWorkspace拒绝应用 - App is rejected using non-public API LSApplicationWorkspace 混淆:(2.5)使用非公共API的应用程序将被拒绝 - confused about: (2.5) Apps that use non-public APIs will be rejected 的含义-使用非公开API的应用将被拒绝 - meaning of - Apps that use non-public APIs will be rejected
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM