如何查找 iPhone 中安装的应用程序 [英] How to find the apps installed in iPhone

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

问题描述

我正在开发一个应用程序,我需要在其中查找已安装在 iPhone 设备(如 Skype、facebook)中的应用程序.我需要检查一下.如果可能,请给我代码片段,否则请提供获取解决方案的链接.

I am developing an application in which I need to find the apps which are already installed in iPhone device such as Skype, facebook. I need to check it. Please give me code snippet if possible otherwise a link to get the solution.

如果可以,那么如何禁用该应用程序?

If this is possible, then how to disable the app also?

推荐答案

您无法检查任何应用程序,但您实际上可以检查正式共享其 URL 方案的应用程序.

You can't check for any application, but you can actually check for applications which officialy shared their url scheme.

您可以在此处找到这些网址方案的最大数据库.现在,如何使用?我们需要的只是 UIApplication.首先,我们需要检查iOS是否可以打开特定的url:

You can find the biggest database of those url schemes here. Now, how to use? All that we'll need is UIApplication. First, we need check if the iOS can open specific url:

[[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"fb://profile"]];

如果此方法返回 yes,则用户已安装 facebook 应用程序.要打开以下应用程序,您需要调用:

If this method returns yes then the user has the facebook application installed. To open the following application you need to call:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"fb://profile"]];

这将在 Facebook 应用程序上打开您的 Facebook 个人资料.

Which will open your Facebook profile on the Facebook application.

唉,不可能在 iOS 上禁用任何其他应用程序,因为每个第三方软件都被沙盒化了.

Alas, there is no possibility of disabling any other application on the iOS, since each and every third party software is being sandboxed.

这篇关于如何查找 iPhone 中安装的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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