Varying iPhone deployment target: Handling Framework constants
<p>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.   </p>

<p>I have code that does the following:
<code>
    if ([m_locationManager respondsToSelector:@selector(startMonitoringSignificantLocationChanges)]) {
         m_locationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation;
    }
    else {
         m_locationManager.desiredAccuracy = kCLLocationAccuracyBest;
    }
</code></p>

<p>in this case, kCLLocationAccuracyBestForNavigation is a constant introduced in iOS 4, and startMonitoringSignificantLocationChanges is a method of m_locationManager only introduced in iOS4. </p>

<p>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?</p>

<p>Thanks,
C</p>
