Open Source iOS Library Providing A Nice Way Of Interfacing With Direction Apps

Late last year I mentioned a library called MWOpenInKit allowing you to provide the user a selection of different apps when opening multiple apps are available to perform a task such as opening Google Maps instead of Apple Maps.

Here’s a library that allows you to very easily show directions within many popular map apps called CMMapLauncher from Citymapper.

CMMapLauncher provides a simple syntax for detecting whether a directions app is installed, and setting up those directions.

Here’s an example from the readme showing how to detect if the Citymapper app is installed:

BOOL installed = [CMMapLauncher isMapAppInstalled:CMMapAppCitymapper];

and an example showing how to launch directions within the Citymapper app:

CLLocationCoordinate2D bigBen = CLLocationCoordinate2DMake(51.500755, 0.124626);
[CMMapLauncher launchMapApp:CMMapAppCitymapper
            forDirectionsTo:[CMMapPoint mapPointWithName:@"Big Ben"
                                              coordinate:bigBen]];

The apps supported by CMMapLauncher include: Apple Maps, Google Maps, Citymapper, Navigon, The Transit App, Waze and Yandex Nabigator.

You can find CMMapLauncher on Github here.

A great tool for avoiding the need to set up different URL schemes and providing the user more options when providing directions.

FacebookTwitterDiggStumbleUponGoogle Plus

Original article: Open Source iOS Library Providing A Nice Way Of Interfacing With Direction Apps

©2014 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

Leave a Reply

Your email address will not be published. Required fields are marked *