Ответ 1
Внедрить - (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error
.
- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error {
NSMutableString *errorString = [[[NSMutableString alloc] init] autorelease];
if ([error domain] == kCLErrorDomain) {
// We handle CoreLocation-related errors here
switch ([error code]) {
// "Don't Allow" on two successive app launches is the same as saying "never allow". The user
// can reset this for all apps by going to Settings > General > Reset > Reset Location Warnings.
case kCLErrorDenied:
//...
break;
case kCLErrorLocationUnknown:
//...
break;
default:
//...
break;
}
} else {
// We handle all non-CoreLocation errors here
}
}