IOS后台位置info.plist密钥名称

时间:2018-06-13 14:31:46

标签: ios core-location info.plist

在IOS总是询问位置权限时,系统会在一段时间后向用户提示一个对话框the app whats to use the location in the background或类似的内容。

如何更改此对话框的说明? 这是其中之一吗?

    <key>NSLocationWhenInUseUsageDescription</key>
    <key>NSLocationAlwaysUsageDescription</key>
    <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>

1 个答案:

答案 0 :(得分:3)

    <key>NSLocationAlwaysUsageDescription</key>
    <string>This string is required to gain permission to access location services on iOS 8+ when the app in the background and should describe how your app uses location services. Set this string in the Info.plist</string>
    <key>NSLocationUsageDescription</key>
    <string>This string is optional but recommended on iOS 6 &amp; 7 and should describe how your app uses location services. Set this string in the Info.plist</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>This string is required to gain permission to access location services on iOS 8+ and should describe how your app uses location services. Set this string in the Info.plist</string>
    <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
    <string>This string is required to gain permission to access location services on iOS 11+ and should describe how your app uses location services. Set this string in the Info.plist</string>