ios8唤不起APP的问题

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