Hi,
I am building an app that needs to work on multiple versions of iPhone OS and makes use of increased accuracy for Core Location in iOS4.
I have code that does the following:
if ([m_locationManager respondsToSelector:@selector(startMonitoringSignificantLocationChanges)]) {
m_locationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation;
}
else {
m_locationManager.desiredAccuracy = kCLLocationAccuracyBest;
}
in this case, kCLLocationAccuracyBestForNavigation is a constant introduced in iOS 4, and startMonitoringSignificantLocationChanges is a method of m_locationManager only introduced in iOS4.
My problem is, that this code is failing on an iPhone 3.1.3 device. It is trying to link to kCLLocationAccuracyBestForNavigation, but it can't find the symbol. My question is, how do I only link to this symbol in the iOS4 version, but not the iPhone 3.1.3 version?
Thanks, C