Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatically detect all map navigation applications installed

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.

like image 838
plawres Avatar asked Nov 08 '22 21:11

plawres


1 Answers

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

like image 124
DonMag Avatar answered Dec 09 '22 21:12

DonMag