如何使用url打开ios应用程序? [英] How to open ios app using url?
本文介绍了如何使用url打开ios应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用网址方案打开我的ios应用。我可以用这个打开app。
但我想如果没有安装应用程序,那么应该打开应用程序商店,用户可以下载应用程序。
这可能吗?我该怎么做?
I want to open my ios app using URL schemes. I am able to open app using this. But I want if app is not installed then app store should be opened where user can download app. Is this possible? How can I do that?
编辑
逐步解释问题:
EDIT Explaining question step wise:
- 我的收件箱中有一封邮件,上面有一个网址。
- 点击网址然后点击
i。如果应用程序安装在手机中,应用程序将启动。
ii。否则将打开应用程序商店下载应用程序。
感谢
推荐答案
我通过我的服务器端代码处理它:
I handled it via my server side code:
if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
location.replace("com.myapp://");
setTimeout(function() {
if (!document.webkitHidden) {
location.replace("https://itunes.apple.com/app/xxxxxxxx");
}
}, 25);}
else if ((navigator.userAgent.match(/android/i)) || (navigator.userAgent.match(/Android/i))) {
location.replace("https://play.google.com/store/apps/details?id=packagename&hl=en");}
else {
location.replace("http://www.example.com");}
我把它放在我的www.mysite中.com /下载页面&通过广告系列分享此网址。
I put this in my www.mysite.com/download page & share this url via campaigns.
这篇关于如何使用url打开ios应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文