后台持续定位CLLocationManager详解

CLLocationManager 8.0方法

locationManager.requestWhenInUseAuthorization()

 locationManager.requestAlwaysAuthorization()

9.0方法

locationManager.allowsBackgroundLocationUpdates = true

locationManager.pausesLocationUpdatesAutomatically = false

此方法不关闭20分钟后自动关闭定位

配置权限

info.plist文件配置

原文地址:https://www.cnblogs.com/fanxinguu/p/6003272.html