iPhone:如果未安装应用,则在移动版Safari中重定向到应用商店 [英] iPhone: redirect to app store on mobile safari if app is not installed

查看:172
本文介绍了iPhone:如果未安装应用,则在移动版Safari中重定向到应用商店的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在优化的移动Safari网站上有两个链接。一个是App Store的链接,用于下载我的应用程序。另一个是Launch App按钮,它使用注册的app://协议打开应用程序。问题是,如果未安装应用程序,当用户单击启动应用程序按钮时,移动版Safari会窒息。是否可以检测注册的协议是否可用,如果不可用,请使用适当的URL(例如下载应用程序URL)更改启动应用程序按钮,以便用户不会获得令人讨厌的弹出窗口?

I have two links on an optimized mobile Safari web site. One is a link to the App Store to download my application. The other is a Launch App button which uses the registered app:// protocol to open the application. The problem is that mobile Safari chokes when the user clicks the Launch App button if the application is not installed. Is it possible to detect if the registered protocol is available, and if it isn't, change the Launch App button with an appropriate URL, such as the download app URL, so that the user doesn't get a nasty popup?

推荐答案

这与这个问题;最相关的建议是有一个单独的按钮,试图启动应用程序,同时创建一个计时器,如果没有安装应用程序,如果它是,那么Safari会在计时器触发之前退出的情况下触发计时器。

This is broadly similar to this question; the most relevant suggestions there are to have a single button that attempts to launch the app, simultaneously creating a timer that'll fire if the app isn't installed on the grounds that if it were then Safari would have exited before the timer fires.

这篇关于iPhone:如果未安装应用,则在移动版Safari中重定向到应用商店的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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