如何阐明其在位置模态中的使用目的?

How to clarify the purpose of its use in the location modal?

在我的应用程序中,我在地图视图上显示用户位置所以我实现了 CLLocationManager。我遇到了 Binary Rejected 错误 .

4.5 - Apps using background location services must provide a reason that clarifies the purpose of the use, using mechanisms described in the Human Interface Guidelines

4.5 详情

您的应用使用后台位置服务,但未按照 iOS 人机界面指南的要求在位置模式警报中阐明其使用目的。

我们已附上屏幕截图供您参考。

后续步骤

请重新配置代码中的 UIAlertControllerStyleAlert 并在其消息字段中指定使用后台位置的预期目的。

您必须在 info.plist 中使用 NSLocationWhenInUseUsageDescriptionNSLocationAlwaysUsageDescription 这个键来编写描述,以便用户知道您的应用程序使用 gps 定位的原因。 两个键都将字符串作为值。并且此字符串显示在 GPS 权限警报中。

info.plist中添加如下。