【发布时间】:2017-12-11 13:07:04
【问题描述】:
我正在开发需要对客户进行位置跟踪的应用程序,即使应用程序被杀死。即使客户应用程序被杀死,我也必须获取客户的位置。认为可以使用显着变化的位置服务来跟踪位置。
在代理中获取位置更新时,重要的位置更改运行良好
- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations{
}
当位置更新发生时,我必须更新到服务器。
- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations{
Can i call API Like other api calls
}
是否可以从这个委托或其他任何事情中调用 API? 任何帮助appriciated。谢谢
【问题讨论】:
-
不,当应用程序处于终止状态时,您无法跟踪位置。您可以跟踪应用程序正在运行或处于后台状态。
-
@ranto andrews,试试这个stackoverflow.com/questions/27742677/…
-
@Ashish 我使用了相同的教程,没有提到 API 调用将数据发送到服务器。
标签: ios core-location