In iOS 8 (maybe 7 too I can't recall) you can set default applications for navigation. I am currently implementing a button that allows a user to open up Apple Maps and get directions to a location the following way:
- (IBAction)getDirections:(id)sender {
CLLocationCoordinate2D endingCoord = storeLocation;
MKPlacemark *endLocation = [[MKPlacemark alloc] initWithCoordinate:endingCoord addressDictionary:nil];
MKMapItem *endingItem = [[MKMapItem alloc] initWithPlacemark:endLocation];
endingItem.name = @"Cubes Pizza Sunway";
NSMutableDictionary *launchOptions = [[NSMutableDictionary alloc] init];
[launchOptions setObject:MKLaunchOptionsDirectionsModeDriving forKey:MKLaunchOptionsDirectionsModeKey];
[endingItem openInMapsWithLaunchOptions:launchOptions];
}
This works great and launches how I'd expect. However, what if the user has Google Maps installed? Will Apple automatically give the user an option? Or do I need to implement an activity sheet and detect all the navigation apps and then figure out the URL schemas for each one?)
How would I go about implementing such a thing?
This is the same question: iOS - run 3rd party navigation app from code but it's a year old and wanted to know if this feature was implemented by APPLE and if not how to implement checking if app is installed etc.