Is it possible to register a http+domain-based URL Scheme for iPhone apps, like YouTube and Maps?

前端 未结 13 2154
灰色年华
灰色年华 2020-11-22 03:55

I\'d like to have iOS to open URLs from my domain (e.g. http://martijnthe.nl) with my app whenever the app is installed on the phone, and with Mobile Safari in case it is no

13条回答
  •  庸人自扰
    2020-11-22 04:29

    window.location = appurl;// fb://method/call..
    !window.document.webkitHidden && setTimeout(function () {
        setTimeout(function () {
        window.location = weburl; // http://itunes.apple.com/..
        }, 100);
    }, 600);
    

    document.webkitHidden is to detect if your app is already invoked and current safari tab to going to the background, this code is from www.baidu.com

提交回复
热议问题