iOS后台位置info.plist键名

标签 ios core-location info.plist

在 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 &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>

关于iOS后台位置info.plist键名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50839830/

相关文章:

xcode11 - 如何阻止Xcode 11将CFBundleVersion和CFBundleShortVersionString更改为$(CURRENT_PROJECT_VERSION)和$(MARKETING_VERSION)?

ios - 我可以在应用程序中更改 'main storyboard file base name' 吗?

ios - 如何在我的 ios 应用程序中共享联系人?

ios - Parse 和 Facebook 的问题

iOS 错误 : No visible @interface for 'xxxx' declares the selector 'alloc'

ios - 我基于 CoreLocation 的 Swift 应用程序未请求用户访问位置的权限

ios - 如何在 iOS 7 网络应用程序中设置状态栏颜色?

objective-c - 将自己的 map 添加到/通过 MapKit iOS

ios - 关于 NSTimeZone.secondsFromGMT 的困惑

ios - 在运行时更改 UIBackgroundModes 音频