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?
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?
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.
In the documentation, it states which OS versions specific functions work on. I don't have the documentation with me (on a PC currently) but if those methods were added in iOS6 they won't be available in earlier versions. What you can do to work around that is use #ifdef
to check the OS version of the user and disable features as necessary.
Please note, that iOS6 is under NDA so questions about specific methods introduced in it should be kept in the Apple Developer Forums.
Edit: #ifdef
is not the way to stop it from running. You just have to check for the version of the OS in your app and do something like:
if (os >= 6) sourceAddress stuff
else if ((os >= 5) && (os < 6) ignore sourceAddress stuff
Please refer the answer given in this post. Should I be worried about rumors that Apple will stop using Google Maps in iOS6?
It has descriptive answer of your question.