如何确定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应用程序?
发布评论