【发布时间】:2011-09-16 06:48:57
【问题描述】:
我遇到了一个关键问题,让我与您分享。 我有一个 iphone 应用程序需要将当前位置发送到服务器,无论应用程序是每分钟处于后台模式还是前台模式。 我在 info.plist 参数中设置了属性,例如背景模式-->位置和其他用于位置配置的代码是通常的
- (CLLocationManager *)loc_mngr { if (loc_mngr != nil) { 返回 loc_mngr; } loc_mngr = [[CLLocationManager alloc] init]; loc_mngr.desiredAccuracy = kCLLocationAccuracyNearestTenMeters; loc_mngr.delegate = 自我; 返回 loc_mngr; }loc_mngr 是 CLLocationManager 的一个对象。 委托方法实现完成。 它对我有用,但问题是如何在我的应用程序处于后台时启用位置服务。 请帮我如何处理? 感谢您的建议。
【问题讨论】:
-
对不起,我不明白你的意思是什么。
标签: core-location cllocationmanager