简体   繁体   English

从IOS 9中的网站链接打开AppStore

[英]Open AppStore from website link in IOS 9

I have a webpage that includes a link to 'Download from the AppStore' which I want to either open the AppStore app if tapped on a device or open the Apple Itunes page for the app if clicked within a desktop browser. 我有一个网页,其中包含“从AppStore下载”的链接,如果点击某个设备,我想要打开AppStore应用程序,或者如果在桌面浏览器中点击该应用程序,请打开该应用程序的Apple Itunes页面。 I am not trying to open the app itself by using myApp:// , just want to open the AppStore download page. 不是想通过使用myApp://来打开应用程序本身,只是想打开AppStore下载页面。

I have this working fine for iOS8 (and lower). 我有这个适用于iOS8(及更低)。 The AppStore app is opened and lands on the app page itself. AppStore应用程序已打开并登陆应用程序页面。 On iOS9 however an error message is shown when tapping the same link: "Safari cannot open the page because the address is invalid" . 但是在iOS9上,当点击相同的链接时会显示错误消息: “Safari无法打开页面,因为地址无效”

错误示例

On the webpage I am using a simple a to link to the appstore page like so: 在网页上我使用简单的a链接到appstore页面,如下所示:

<a href="https://itunes.apple.com/gb/app/twitter/id333903271?mt=8" class="appstore-base" target="_blank">

Note: I have replaced my app with Twitter for this example, URL format is the same . 注意:在此示例中,我已使用Twitter替换了我的应用程序,URL格式相同

How can I get this to open the AppStore on iOS 9? 如何在iOS 9上打开AppStore?

Now apple direct call to store are forbidden. 现在禁止苹果直接打电话到商店。 if you want to redirect to AppStore you must create Deep Linking. 如果要重定向到AppStore,则必须创建深层链接。 On click, user will be redirect to the appStore or your app if she's already installed 点击后,如果已安装,用户将重定向到appStore或您的应用

you can find how to on this page : http://mobiledeeplinking.org/ 你可以在这个页面上找到: http//mobiledeeplinking.org/

I hope that can help you... 我希望能帮到你......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM