太原网站建设与维护,做视频网站 服务器配置,做动态图片的网站吗,阿里巴巴国际网站首页视频怎么做一般在项目中添加权限只需要看这一篇文章#xff1a;https://www.jianshu.com/p/2a309504cec8 就够了#xff0c;但是位置权限说明有点麻烦#xff0c;现总结如下#xff0c;方便后期使用。定位权限一般有四个#xff1a;NSLocationWhenInUseUsageDescriptionNSLocationAl…一般在项目中添加权限只需要看这一篇文章https://www.jianshu.com/p/2a309504cec8 就够了但是位置权限说明有点麻烦现总结如下方便后期使用。定位权限一般有四个NSLocationWhenInUseUsageDescriptionNSLocationAlwaysAndWhenInUseUsageDescriptionNSLocationUsageDescriptionNSLocationAlwaysUsageDescriptionNSLocationWhenInUseUsageDescription 用在 iOS app上只能用于应用在前台时需要获取用户位置的权限说明官方解释如下Use this key if your iOS app accesses location information only when running in the foregroundNSLocationAlwaysAndWhenInUseUsageDescription用在 iOS app上, 用于应用在后台时需要获取用户位置的权限说明官方解释如下Use this key if your iOS app accesses location information while running in the background我一般会在info.plist 文件中同时添加 NSLocationWhenInUseUsageDescription 和 NSLocationAlwaysAndWhenInUseUsageDescription只添加一种好像是不谈出权限弹框位置弹框如下位置权限弹框.pngNSLocationUsageDescription用在 macOS app上用于获取用户位置信息的权限说明官方解释如下Use this key in a macOS app that accesses the user’s location informationNSLocationAlwaysUsageDescription用在 iOS app 上用于 iOS11 之前应用在后台时需要获取位置权限说明,需要跟NSLocationAlwaysAndWhenInUseUsageDescription 一起添加iOS11 之后只添加NSLocationAlwaysAndWhenInUseUsageDescription就可以了官方解释如下Use this key if your iOS app accesses location information in the background, and you deploy to a target earlier than iOS 11. In that case, add both this key and [NSLocationAlwaysAndWhenInUseUsageDescription](apple-reference-documentation://hspmGRevlx) to your app’s Info.plist file with the same message. Apps running on older versions of the OS use the message associated with NSLocationAlwaysUsageDescription, while apps running on later versions use the one assocated with NSLocationAlwaysAndWhenInUseUsageDescription.先记录这些感谢阅读如有错误不吝赐教