How to get the list of applications suitable for r

2019-08-26 22:30发布

问题:

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?

回答1:

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”) }



标签: swift maps ios11