Search code examples
swiftmapsios11

How to get the list of applications suitable for routing from the user’s device?


Is there any way to check if user has a certain app (google.maps, yandex.maps or native maps) on his/her device to make a list of apps suitable for routing?


Solution

  • You can check if user has this apps on device (google.maps, yandex.maps or native maps) using URL scheme.

    for Google maps:

    let appURL = URL(string: “comgooglemaps://”) if UIApplication.shared.canOpenURL(appURL!) { // code for open URL print(“Can Open URL”) }