确定应用是否存在并在iOS上启动该应用 [英] Determine if an app exists and launch that app on iOS

查看:130
本文介绍了确定应用是否存在并在iOS上启动该应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法检查iOS以查看是否已安装其他应用程序然后启动?如果内存为我服务,这在早期版本中是不可能的,但是这已经改变了吗?

Is there a way to check iOS to see if another app has been installed and then launched? If memory serves me this was not possible in early versions but has this been changed?

推荐答案

可行,但很棘手。

使用自定义URL方案启动已安装的应用程序,如FB或Twitter应用程序。这些可以在其他应用程序和网站上使用。

Launching installed apps, like the FB or Twitter apps, is done using the Custom URL Scheme. These can be used both in other apps as well as on web sites.

这是一篇关于如何使用自己的应用程序执行此操作的文章

看看URL是否存在,可能会很棘手。检测已安装应用的应用的一个很好的示例是 Boxcar 。这里的事情是Boxcar拥有自定义URL的高级知识。我相当(99%)确定有一个 canOpenURL:,所以知道你想要提前定位的应用程序的自定义方案使得这个实现起来很简单。

Seeing if the URL is there, though, can be tricky. A good example of an app that detects installed apps is Boxcar. The thing here is that Boxcar has advanced knowledge of the custom URL's. I'm fairly (99%) certain that there is a canOpenURL:, so knowing the custom scheme of the app you want to target ahead of time makes this simple to implement.

以下是部分列表您可以查看更受欢迎的网址。

Here's a partial list of some of the more popular URL's you can check against.

但是如果您想扫描应用并推断其网址,则无法在非JB设备上完成。

But if you want to scan for apps and deduce their URL's, it can't be done on a non-JB device.

这是一篇博文谈论Bump的人如何处理这个问题。

Here's a blog post talking about how the folks at Bump handled the problem.

这篇关于确定应用是否存在并在iOS上启动该应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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