如何澄清其在位置模态中的使用目的?

suh*_*has 8 app-store cllocationmanager ios

在我的应用程序中我在地图视图上显示用户位置所以我实现了CLLocationManager.二进制拒绝后我得到了以下错误.

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
Run Code Online (Sandbox Code Playgroud)

4.5详情

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

我们附上了截图供您参考.

下一步

UIAlertControllerStyleAlert在您的代码中重新配置,并在其消息字段中指定使用背景位置的预期目的.

Div*_*iya 13

您必须在info.plist中使用NSLocationWhenInUseUsageDescriptionAnd NSLocationAlwaysUsageDescriptionthis key 编写描述,以便用户知道您的应用使用gps位置的原因.两个键都将字符串作为值.此字符串显示在GPS权限警报中.

加入info.plist如下.

在此输入图像描述