In iOS apple maps application, when selecting a destination, apple maps gives you options to use any of the installed mapping apps to get turn by turn directions.
How does apple maps do this? is there a way to implement similar feature in my own app?
One way is to get a list of most popular navigation apps, check that they support url schemes, and check if any of them are installed by using:
if ([[UIApplication sharedApplication] canOpenURL:url]) {
// mapping app is installed ...
}
However, this is not reliable as url schemes might change and also some of the mapping turn-by-turn apps do not support url schemes.
Thanks in advance.
Is this what you're looking for?
Whoops, probably not what you were looking for, but this is how Apple Maps does it. Maybe somewhere in that documentation (or digging deep into it) you might find a way.
From Apple's docs:
iOS apps that are able to display point-to-point directions can register as routing apps and make those directions available to Maps and other apps.
https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/AddingCapabilities/AddingCapabilities.html#//apple_ref/doc/uid/TP40012582-CH26-SW9
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With