I am trying to use the new iOS 6 feature of deffered location updates but keep on getting this error :
didFinishDeferredUpdatesWithError :Error Domain=kCLErrorDomain Code=11 "The operation couldn’t be completed. (kCLErrorDomain error 11.)"
I am using the following code:
- (DeviceAPI *) init
{
locationManager = [[CLLocationManager alloc] init];
[locationManager setDelegate:self];
[locationManager setDesiredAccuracy:kCLLocationAccuracyBest];
[locationManager startUpdatingLocation];
[locationManager allowDeferredLocationUpdatesUntilTraveled:(CLLocationDistance)100000 timeout:(NSTimeInterval)100000];
return self;
}
And this callback
function :
- (void)locationManager: (CLLocationManager *) manager
didFinishDeferredUpdatesWithError:(NSError *)error
{
NSLog(@"didFinishDeferredUpdatesWithError :%@", [error description]);
}
Any help?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…