Search code examples
iosroutesmapkitcompatibilitymkmapview

Does iOS 6 MapKit work on previous versions of iOS?


I`m developing an app that uses MKMapView, and I need it to run in iOS4, iOS5 and iOS6.

My question is, if I develop using the new iOS MapKit features, can someone using iOS4 see things like routing from sourceAddress to destinationAddress?


Solution

  • Yes and no.

    If your write a maps app using iOS 6 features, it won't run on older versions of iOS, unless you check for the existence of those methods.

    More generally speaking, the MapKit framework is smart enough to show the iOS 6 maps where appropriate, and to use Google Maps everywhere else. However, you need to avoid using the routing features where it's not supported. So, to abswer your question, users on iOS 4 and 5 will not see the new routing features.

    So, if your app doesn't use new maps features, you're totally fine. If it does, you'll need to take steps, such as weak linking and method checking to ensure that your app doesn't try to run new API on older system versions. Running new code on iOS versions that don't support said code will crash, of course.