Universal Links not working on iOS10

2019-01-18 00:07发布

问题:

Just updated my iPhone to iOS10 and the Universal links stopped working. If I run my app in an iPhone with iOS9, or lower, the Universal Links work fine, but the are just not working at all in iOS10.

Any clues?

回答1:

It sounds like you inadvertently deactivated Universal Links. This usually happens if you tap the bypass link in the top right corner of the screen after opening a Universal Link.

This is a per-app setting that is saved on each unique device. The setting is preserved even if you delete the app and reinstall it, so the only way to reverse this is by intentionally re-enabling Universal Link behavior for that app on your device. There are a couple of ways to do this:

  1. Paste the link into Notes or iMessage (or some other app that supports Universal Links) and long-press on it. You'll see an 'Open in [App]' option. Select it, and after that all Universal Links for that app will work again.
  2. On the the webpage that opens in Safari — assuming it doesn't immediately redirect somewhere else — you can scroll up on the initial view to get a banner. Clicking this will also re-enable Universal Links for the associated app.



回答2:

Ensure that you have the app installed on your device first. A fix for iOS 11 is to text or send the universal URL to yourself or a friend via iMessage. Then tap on the link to open it. It should automatically launch the app. This should fix the issue.

A couple of notes:

  • Some apps like Slack (at the moment) does not send me to the app but instead sends me to Safari. So don't rely on Slack to test your universal links.
  • Another thing that wasn't working for me was seeing the app banner from safari, but after sending the URL via iMessage and tapping on it, I am able to see the app banner from safari again.