如何以编程方式检查iPhone中是否安装了应用程序列表

问题描述:

在我的应用程序中,我正在显示应用程序列表。是否可以在iPhone中找到已安装或未安装的应用程序数组。
如果有任何可能性,请在swift中提供相关代码,以检查iPhone中是否安装了应用程序数组。

In my app I'm showing list of applications.Is it possible to find that the array of applications are installed or not in iPhone. If any possibility is there anyone please provide related code in swift to check the array of applications is installed or not in iPhone.

在过去,您可以使用 canOpenURL nofollow noreferrer> iHasApp 。这仅适用于注册自定义深层链接方案的应用程序,但它捕获了大多数重要应用程序。

In the old times you could have used canOpenURL with a library like iHasApp. This only works for apps that register custom deep link schemes, but it was capturing the majority of important apps.

但是自iOS 9以来,这种方法似乎有限制 - 请参阅如何重置iOS9中的'canOpenURL`限制?

But since iOS 9 there seems to be a limitation to this approach - see How to reset `canOpenURL` limit in iOS9?

一般情况下,由于隐私原因,您的应用不允许知道系统中安装了哪些其他内容。

In general your app is not allowed to know what else is installed in the system for privacy reasons.