UALocationServiceDelegate Protocol Reference
Conforms to | NSObject |
Declared in | UALocationService.h |
Overview
The UALocationServiceDelegate receives location updates from any of the UALocationServices.
Instance Methods
locationService:didChangeAuthorizationStatus:
Updates the delegate when authorization status has changed.
- (void)locationService:(UALocationService *)service didChangeAuthorizationStatus:(CLAuthorizationStatus)status
Parameters
- service
Location service reporting the change
- status
The updated location authorization status
Declared In
UALocationService.h
locationService:didFailWithError:
Updates the delegate when the location service generates an error.
- (void)locationService:(UALocationService *)service didFailWithError:(NSError *)error
Parameters
- service
Location service that generated the error
- error
Error passed from a CLLocationManager
Discussion
Warning: Two error conditions will stop the location service before this method is called on the delegate. kCLErrorDenied && kCLErrorNetwork. All other CoreLocation errors are passed directly to the delegate without any side effects. For the case when the location service times out, an NSError* UALocationServiceError will be returned with the best available location in the userInfo dictionary with UALocationServiceBestAvailableSingleLocationKey as the key if a location was returned. In the case of a timeout, the locationService:didUpdateLocations: will also be called with the best available location if it is available. There is no guarantee as to the accuracy of this location.
Declared In
UALocationService.h
locationService:didUpdateLocations:
Updates the delegate when a new location is received. In case of a timeout, where locations have been acquired, but they do not meet the accuracy requirements, the most accurate location available will be returned.
- (void)locationService:(UALocationService *)service didUpdateLocations:(NSArray *)locations
Parameters
- service
The service reporting the location update
- locations
The updated locations reported by the service
Discussion
Warning: In the background, this method is called and given a limited amount of time to operate, including the time necessary to update UrbanAirship. Extensive work done by the method while backgrounded could result in location data not being recorded or sent.
Declared In
UALocationService.h