How to check if an app is installed from a web-page on an iPhone?

后端 未结 10 1036
忘了有多久
忘了有多久 2020-11-22 09:57

I want to create a web-page, a page that will redirect an iPhone to the app-store if the iPhone does not have the application installed, but if the iPhone has the app instal

10条回答
  •  忘掉有多难
    2020-11-22 10:16

    As far as I know you can not, from a browser, check if an app is installed or not.

    But you can try redirecting the phone to the app, and if nothing happens redirect the phone to a specified page, like this:

    setTimeout(function () { window.location = "https://itunes.apple.com/appdir"; }, 25);
    window.location = "appname://";
    

    If the second line of code gives a result then the first row is never executed.

    Hope this helps!

    Similar question:

    • iPhone browser: Checking if iPhone app is installed from browser
    • Is it possible to register a http+domain-based URL Scheme for iPhone apps, like YouTube and Maps?

提交回复
热议问题