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.