如何确定用户是否安装了iOS应用程序? [英] How can I determine if a user has an iOS app installed?

查看:129
本文介绍了如何确定用户是否安装了iOS应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何确定iOS设备的用户是否安装了特定的应用程序?如果我知道应用程序的名称,我可以用某种方式使用 canOpenURL 吗?

How can I determine if the user of an iOS device has a specific application installed? If I know the name of the application can I use canOpenURL somehow?

推荐答案

如果应用程序支持自定义URL方案,您可以检查 UIApplication -canOpenURL:。这只会告诉您一个能够打开该url方案的应用程序是可用的,而不一定是哪个应用程序。没有公开的机制来检查用户在其设备上安装的其他应用程序。

If the application supports a custom url scheme you can check UIApplication -canOpenURL:. That will tell you only that an application able to open that url scheme is available, not necessarily which application that is. There's no publicly available mechanism to inspect what other apps a user has installed on their device.

如果您控制这两个应用程序,您也可以使用共享钥匙串或粘贴板进行通信它们更详细。

If you control both apps you might also use a shared keychain or pasteboard to communicate between them in more detail.

这篇关于如何确定用户是否安装了iOS应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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