在 iPhone 上,如何使 URL 显示 App Store 中的条目? [英] On the iPhone, how can you cause a URL to display an entry in the App Store?

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

问题描述

例如,如果有人在 iPhone 上查看某个应用的 URL,我们希望该 URL 打开 App Store 并显示与该应用相关的条目.这个想法是允许在 iPhone 上通过两次点击(点击链接,然后点击安装"按钮)下载应用程序.

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.

这怎么可能?

澄清一下,在 iPhone 应用程序中,我们如何在 App Store 中自动启动正确的条目?我知道移动版 Safari 可以识别 iTunes URL,但我们更喜欢启动 App Store,而不是先重定向到移动版 Safari.

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:

App Store 有特定的 url 类型.使用它会阻止 Safari 和 iTunes 首先弹出.App Store 链接是:

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"]];

您可以从位于 http://itunes.apple.com/linkmaker 的 iTunes Link Maker 获取正确的应用程序链接

就我的一个应用而言,它看起来像这样:

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天全站免登陆