iOS Universal Link App Store redirect

前端 未结 2 1860
感动是毒
感动是毒 2021-01-31 00:08

I have universal links working correctly, when the app is installed I see how the link opens the app, and when it\'s not installed opens the url in safari.

Actually what

相关标签:
2条回答
  • 2021-01-31 00:25

    From here: https://developer.apple.com/library/archive/documentation/General/Conceptual/AppSearch/UniversalLinks.html

    "When you support universal links, iOS 9 users can tap a link to your website and get seamlessly redirected to your installed app without going through Safari. If your app isn’t installed, tapping a link to your website opens your website in Safari."

    You're not doing it wrong, that's just how they work.

    0 讨论(0)
  • 2021-01-31 00:38

    You're right: server-side redirects aren't allowed for the apple-app-site-association file. However, I believe once the user opens a Universal Link and (assuming the app is not installed) lands on the URL, all options are on the table (server-side, or otherwise).

    If the page on the other end of your Universal Links URL contains an instant JS redirection to your app's App Store page, that should work just fine. Something like this:

    window.location = 'itms-apps://itunes.apple.com/us/app/imdb-movies-tv/id342792525'
    

    But yes, no matter how you do it, Safari is still going to open. It'll flash past so quickly that the user likely won't even notice. Here's a real-time recording I just made of the Branch.io deep linking service's demo app doing exactly this process:

    0 讨论(0)
提交回复
热议问题