一、在Capabilities选择Background Modes - >ON,勾选 Location updates
定位后台模式设置.png
二、 infoPlist设置定位权限:
- 允许使用应用期间定位:NSLocationWhenInUseUsageDescription
- 始终允许定位: NSLocationAlwaysUsageDescription
infoPlist定位权限设置.png
一、在Capabilities选择Background Modes - >ON,勾选 Location updates
二、 infoPlist设置定位权限: