如何知道iPhone中安装的应用程序 [英] How to know the apps installed in iPhone

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

问题描述

我正在开发一个应用程序,其中我需要找到已经安装在iphone设备(如Skype,Facebook)中的应用程序。我需要检查请给我代码片段,如果可能,否则链接获得解决方案。是否可行。



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



提前感谢...

解决方案

您无法检查任何应用程序,但您实际可以检查官方分享他们的网址计划的应用程序。



您可以找到这些网址计划的最大数据库这里。现在,怎么用?所有我们需要的是UIApplication。首先,我们需要检查iOS是否可以打开特定的URL:

  [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@ FB://轮廓]]; 

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

  [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@fb: /配置文件]]; 

哪些将在Facebook应用程序中打开您的Facebook个人资料。


$ b唉,因为每个第三方软件都被沙盒,所以不可能在iOS上禁用任何其他应用程序。



希望这是有帮助的,
Pawel


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. Is it possible or not.

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

Thanks in advance......

解决方案

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

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"]];

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"]];

Which will open your facebook profile on the facebook application.

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

Hope this was helpful, Pawel

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

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