如何获取适合从用户设备进行路由的应用程序列表? [英] How to get the list of applications suitable for routing from the user’s device?

查看:60
本文介绍了如何获取适合从用户设备进行路由的应用程序列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过某种方式检查用户的设备上是否有某个应用程序(google.maps,yandex.maps或本机地图)以列出适合路由的应用程序?

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?

推荐答案

您可以使用URL方案检查用户是否在设备(google.maps,yandex.maps或本机地图)上安装了此应用程序.

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

对于Google地图:

for Google maps:

让appURL = URL(字符串:"comgooglemaps://")如果UIApplication.shared.canOpenURL(appURL!){//开放网址的代码打印(可以打开URL")}

这篇关于如何获取适合从用户设备进行路由的应用程序列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆