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

女生的网名这么多〃 提交于 2019-12-24 20:31:29

问题


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



来源:https://stackoverflow.com/questions/53852623/how-to-get-the-list-of-applications-suitable-for-routing-from-the-user-s-device

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!