I am trying to use some of the features of CoreLocation and am having problems with pending location updates.
For some reason, when the app was updated for iOS 10, the pending LocationUpdatesAvailable always returns NO. I am testing the iPhone 6, so I know that the device is capable of using GPS functions.
I tried using this for debugging:
[CLLocationManager deferredLocationUpdatesAvailable]
I canโt understand if this is a problem with iOS 10 or if I have something incorrectly installed.
In this method:
- (void)locationManager:(CLLocationManager *)manager didFinishDeferredUpdatesWithError:(NSError *)error { self.deferringUpdates = NO; NSLog(@"DEFERRING Error: [%@]", error); if (error) { [[LocationManagerClient alertWithMessage:error.localizedDescription andTitle:error.domain] show]; } }
As a result, I am logging this error:
DEFERRING Error: [Error Domain=kCLErrorDomain Code=11 "(null)"]
Does anyone else encounter this issue with iOS 10 or have an idea of โโwhat's going on?
Edit: This is how I set the distance filter
- (void)configureForApplicationWillResignActive { [_locationManager setAllowsBackgroundLocationUpdates:YES]; [_locationManager setPausesLocationUpdatesAutomatically:NO]; [_locationManager setDesiredAccuracy:kCLLocationAccuracyBest]; [_locationManager setDistanceFilter:kCLDistanceFilterNone];
ios objective-c core-location
Erik Sep 14 '16 at 20:13 2016-09-14 20:13
source share