After adding a test for error code to MKReverseGeocoder’s callback, got a linker error indicating that _MKErrorDomain is not defined:
- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFailWithError:(NSError *)error {
// some useful but irrelevant code removed here...
// if the error is not permanent, try again
NSString *errorDomain = [error domain];
NSInteger errorCode = [error code];
if ([errorDomain isEqualToString:MKErrorDomain] && errorCode != MKErrorPlacemarkNotFound) {
[self scheduleReverseLookup];
}
}
Linker error:
Undefined symbols for architecture armv6:
"_MKErrorDomain", referenced from:
-[Tracker reverseGeocoder:didFailWithError:] in Tracker.o
Note that MapKit is being linked in and works fine with the test for MKErrorDomain removed.
I have the same issue, which is also true for
arvm7, with latest iOS 4.3 / Xcode 4.0.1.Looks like
<MapKit/MKTypes.h>is missing his little brotherMKTypes.oin MapKit binary…Anyway, a quick (and dirty) fix is to use
@"MKErrorDomain"instead of theMKErrorDomainconstant.Or a little bit better, in any case this is fixed later, or if you reference it a lot, you can redefine it :