首页 > 代码库 > 后台持续定位CLLocationManager详解

后台持续定位CLLocationManager详解

CLLocationManager 8.0方法

locationManager.requestWhenInUseAuthorization()

 locationManager.requestAlwaysAuthorization()

9.0方法

locationManager.allowsBackgroundLocationUpdates = true

locationManager.pausesLocationUpdatesAutomatically = false

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

技术分享

配置权限

info.plist文件配置

技术分享

后台持续定位CLLocationManager详解