我在我的申请中使用-startMonitoringSignificantLocationChanges
。
在后台申请
- (void) locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
方法调用。我想在didUpdateToLocation中调用API(在后台应用程序时)。当位置显着变化时,上述方法称为。在那个方法中,我调用了我的API。这一切都发生在后台,一切都运作良好。我想知道它可以吗?我对苹果文档并不了解。我认为这种方法苹果不会拒绝。请任何人给我一些想法。
谢谢
答案 0 :(得分:0)
您正在使用已弃用的API。此方法在iOS 6中已弃用,并替换为:
- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations
如果你想支持早期版本,你应该同时实现它们。
祝你好运P.S。 Apple永远不会拒绝他们自己公开API的方法。