描述
应用程序没有请求用户访问位置和获取状态notDetermined的权限。
一直工作到iOS-10
var locationManager : CLLocationManager!
func getLocationDetails()
{
locationManager.delegate = self
locationManager.desiredAccuracy = kCLLocationAccuracyBest
locationManager.requestAlwaysAuthorization()
locationManager.allowsBackgroundLocationUpdates = true
locationManager.startUpdatingLocation()
}
func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus)
{
if status == CLAuthorizationStatus.authorizedAlways || status == CLAuthorizationStatus.authorizedWhenInUse
{
locationManager.startUpdatingLocation()
}
}
func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation])
{
}胶合板截图

背景模式

发布于 2017-09-21 08:43:13
我已经翻阅了苹果的文档,并找到了这个问题的解决方案。
苹果公司几乎没有改变用户定位的指导方针。
这是视频链接:苹果-什么是新的定位技术
解决方案:
现在,我们需要在Plist中添加三个身份验证密钥:
Plist看起来如下:

身份验证消息屏幕如下所示:

发布于 2017-09-21 06:41:38
请在“使用许可时”请求另一个许可,并在plist上添加两种权限。
发布于 2018-03-03 02:37:37
为了请求权限,我在文件中添加了两个键,但是在删除应用程序并再次打开它之后,模拟器没有显示警报以允许用户选择一个选项。
我可以在删除应用程序后再次显示警报,然后打开settings 应用程序,最后再安装该应用程序。
希望能帮上忙。
https://stackoverflow.com/questions/46336530
复制相似问题