Search code examples
iosios6mapkitdynamic-linkinggoogle-maps-sdk-ios

Is it possible to load a library before linking based on iOS version?


I have an application which is supposed to use google maps and mapkit framework. Now, google maps are only supported on iOS version 5.1 and further whereas Mapkit framework is supported on lower versions. I want to the application to:

  1. Load Mapkit on lower versions of the device.
  2. Load Google maps for 5.1 and above versions, before linking.

    Bottomline is, is it possible to load the specific libraries based on iOS version of the device when application launches, before linking ? OR so can I programmatically choose between the two, based on the iOS version ? Thanks for any help.


Solution

  • Note that just including the Google Maps SDK for iOS in your app will make it crash on iOS 4.x - even if you don't call anything in the SDK. See here for details:

    Google Maps SDK for iOS trying to run on iOS 4.3

    So if you take this approach, you'll be able to use Google maps on iOS 5.1+, but only be able to use Apple maps on iOS 5.0. Given that probably less than 1% of users are running iOS 5.0 (see here), it might not be worth the trouble.