iphone - 检查是否安装了应用程序 [英] iphone - Check if an app is installed

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

问题描述

我想提供我的iPhone中安装的应用程序列表。

I want to bring the list of what apps are installed in my iPhone.

我听说这个代码示例在本网站但我找不到。

I hear this code sample is in this website but I can't find it.

代码示例:检查是否安装了应用程序 - iDevKit:
http://idevkit.com/forums/tutorials-code-samples-sdk/604-code-sample- check-if-app-installed.html

Code Sample: Check if an app is installed - iDevKit: http://idevkit.com/forums/tutorials-code-samples-sdk/604-code-sample-check-if-app-installed.html

任何人都可以给我一个提示或如何从网站上获取该代码吗?

Can anyone give me a hint or how to get that code from the website?

谢谢。

推荐答案

这不适用于非越狱的iOS设备 - 应用程序沙箱防止它。如果您知道他们实现的URL方案(例如,电话应用程序的 tel:// ),则可以通过调用 [来测试某些单独的应用程序[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@someScheme:// blah]] ,但如果应用程序没有响应任何URL方案,那么你将无法确定它是否出现在设备上。

This is not possible on non-jailbroken iOS devices—the app sandbox prevents it. You can test for some individual applications, if you know the URL schemes they implement (e.g. tel:// for the Phone app), by calling [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"someScheme://blah"]], but if an app doesn’t respond to any URL schemes then you’re not going to be able to determine whether it’s present on the device.

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

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