iphone - 检查是否安装了应用程序
我想提供我的 iPhone 中安装的应用程序的列表。
我听说这个代码示例在这个网站上,但我找不到它。
代码示例:检查是否安装了应用程序 - iDevKit: http://idevkit .com/forums/tutorials-code-samples-sdk/604-code-sample-check-if-app-installed.html
任何人都可以给我提示或如何从 网站?
谢谢。
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.
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?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这在未越狱的 iOS 设备上是不可能的——应用程序沙箱会阻止它。如果您知道某些单独的应用程序实现的 URL 方案(例如,电话应用程序的
tel://
),则可以通过调用[[UIApplication shareApplication] 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.在越狱设备上,您可以检查应用程序二进制文件:
或者,如果您知道该应用程序具有自定义 URL 架构,您可以检查该 URL 是否可以打开:
On a jailbroken device you can check against the apps binary:
Or, if you know the app has a custom URL Schema you can check if the URL can be opened: