在iPhone上,你怎么能引起URL显示在App Store中的条目? [英] On the iPhone, how can you cause a URL to display an entry in the App Store?

查看:195
本文介绍了在iPhone上,你怎么能引起URL显示在App Store中的条目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,如果有人认为一个URL在iPhone上的应用程序,我们希望URL打开App Store并显示与该应用程序的条目。我们的想法是让两个点击一个应用程序的下载(点击链接,然后点击安装按钮),在iPhone上。

这怎么可能呢?

为了澄清,在iPhone应用程序中,我们如何能够自动启动在App Store正确的条目?据我所知,移动Safari浏览器识别iTunes网址,但我们preFER推出的App Store没有重定向到移动Safari浏览器第一次。


解决方案

编辑以一个更好的答案:

有对App Store的一个特定的URL类型。使用它会prevent Safari和iTunes的从第一个弹出。 App Store的链接是:

  ITMS-应用://

作为一个例子,可以响应于用户敲击一个按钮(或其他作用)这样做

  [UIApplication的sharedApplication]的OpenURL:[NSURL URLWithString:@ITMS-应用:// yourAppLinkHere]];

您可以在 http://itunes.apple.com/linkmaker获得从iTunes链接设备的正确应用链接

在我的应用程序之一的情况下,它应该是这样的:

  [UIApplication的sharedApplication]的OpenURL:[NSURL URLWithString:@ITMS-应用://itunes.apple.com/us/app/its-on-my-way/id334996949 ?公吨= 8和; UO = 4]];

For instance, if someone views a URL for an app on the iPhone, we would like the URL to open the App Store and display the entry related to that app. The idea is to allow downloading of an app with two clicks (click on link, then click on "Install" button) on the iPhone.

How is this possible?

[Edit] To clarify, from within the iPhone app, how can we automatically launch the right entry in the App Store? I understand that mobile Safari recognizes iTunes URL, but we prefer launching the App Store without redirecting to mobile Safari first.

解决方案

EDITED for a better answer:

There's a specific url type for the App Store. Using it will prevent Safari and iTunes from popping up first. The App Store link is:

itms-apps://

As an example, you could do this in response to the user tapping a button (or whatever action):

[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"itms-apps://yourAppLinkHere"]];

You can get the correct app link from the iTunes Link Maker at http://itunes.apple.com/linkmaker

In the case of one of my apps, it would look like this:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"itms-apps://itunes.apple.com/us/app/its-on-my-way/id334996949?mt=8&uo=4"]];

这篇关于在iPhone上,你怎么能引起URL显示在App Store中的条目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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