How can I disable the “open in app” banner on ios safari for pages that support universal links?

后端 未结 1 1481
被撕碎了的回忆
被撕碎了的回忆 2021-01-03 07:27

After registering a path as a universal link via apple-app-site-association, I\'m seeing that on pageloads on iOS safari, when I have the app installed, the system will inje

相关标签:
1条回答
  • 2021-01-03 08:12

    EDIT:

    In my answer below, I realized that only loads when the app is not installed. What you are trying to accomplish may not be possible. Since the AASA file is installed on the device, Safari will automatically associate that web page with an app and therefore load the banner in the browser. I don't believe this is an HTML element that you can just remove with a JQuery call. A solution to this would be to use a redirecting link as your Universal Link. This way if the app is installed, the app will open, and if not then it will redirect to your site which isn't recognized as a Universal Link and will not show the banner. Branch is the a solid deep linking solution that uses redirects, so you won't have to deal with the Apple banner.

    Removing banner when app is not installed

    Make sure the smart app banner meta tag is not being loaded on your page. If you see this tag, take it out:

    <meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">
    
    0 讨论(0)
提交回复
热议问题