ios8唤不起APP的问题

本文介绍了一种在iOS 8中通过使用URL Scheme实现应用内跳转的方法,并给出了具体的JavaScript代码示例。此外,还展示了如何在应用未安装时引导用户前往App Store下载。

 

https://stackoverflow.com/questions/27526966/ios-8-window-location-href-doesnt-work-with-url-scheme

ios8下去掉href:

        var appUrl = tid ? "cehomeapp://threadDetailPage?tid=" + tid : "cehomeapp://";

        var sendObjectMessage = function(url) {
            var iframe = document.createElement('iframe');
            iframe.setAttribute('src', url);
            document.documentElement.appendChild(iframe);
            iframe.parentNode.removeChild(iframe);
            iframe = null;
        }

        sendObjectMessage(appUrl);

        setTimeout(function(){
            $(".openAppLoading").addClass("hide");
            var targetUrl = "https://itunes.apple.com/cn/app/tie-jia-lun-tan-tie-jia-gong/id989144923?mt=8";

            window.location = targetUrl;

        }, 2000);

 

转载于:https://www.cnblogs.com/dongruiha/p/7125114.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值