在 IOS 上,当始终打开请求位置权限时,一段时间后系统会向用户提示一个对话框,显示应用程序在后台使用该位置
或类似内容。
如何更改此对话框的描述? 是其中之一吗?
<key>NSLocationWhenInUseUsageDescription</key>
<key>NSLocationAlwaysUsageDescription</key>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
最佳答案
<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 & 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>
关于iOS后台位置info.plist键名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50839830/