Apple App Review Location Services 同意问题

Apple App Review Location Services Consent Issue

App Store Connection 审核人员通知我,我的构建违反了以下规则:

Guideline 5.1.1 - Legal - Privacy - Data Collection and Storage

We noticed that your app requests the user’s consent to access their location but does not clarify the use of the location in the applicable purpose string.

...即使我在我的应用程序 Info.plist 中包含了以下键值对:

Privacy - Location When In Use Usage Description: Access to location while the app is in use is required initialize your map feed.

...因此我无法在下面与我分享的屏幕截图中复制该问题:

这是我一直在同一个设备上看到的对话 (iPad) iOS 13.3:

我对 Apple's docs 的理解是我只需要 NSLocationWhenInUseUsageDescription 因为我的应用程序只需要在前台访问用户的位置。

有没有人以前遇到过类似的问题或者知道它的根源是什么?非常感谢!

编辑:以下是管理此体验的代码。

func requestLocationAuthorization(completion: (() -> Void)?) {
        let locationManagerAuthorizationStatus: CLAuthorizationStatus = CLLocationManager.authorizationStatus()
        let appName = Bundle.main.infoDictionary![kCFBundleNameKey as String] as! String

        switch locationManagerAuthorizationStatus {
        case .notDetermined:
            LNTLocationManager.sharedInstance.requestAuthorization()
        case .denied:
            let alertString = "To initialize your map feed to your location, enable " + appName + " to use your location while using the app."
            presentSettingsAlert(with: alertString, completion: nil)
        default:
            break
        }

        completion?()
        return
    }

在我不启用位置访问的情况下,我总是看到以下提示,而不是评论者遇到的提示:

他们显示的对话框是您第一次说 startUpdatingLocation 从系统 出现的对话框,而 locationServicesEnabledfalse.它与发出的denied警报无关。

注意这与用户授权无关!这与位置服务被关闭有关作为一个整体。苹果在测试时会检查这种情况。您的应用似乎没有。

为了防止出现系统对话框,请始终检查 locationServicesEnabled 是否为 true,如果不是,不再继续

(但是,话虽如此,如果他们认为他们显示的对话框应该包含您的使用说明,那么来自 Apple 的消息是不正确的。事实并非如此。它总是看起来像他们显示的那样.你可能想回信告诉他们。他们现在可能有一些人为他们工作,但他们不知道自己在做什么。)