Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

We have an app that uses the universal links functionality and works most of the time but in some cases, specially with fresh installs and in random scenarios, when the user clicks the deep link on the email the mobile app is not opened and the web browser does it instead. The app supports iOS 12.2 and up.

Our set up is like this:

  1. Currently the aasa file is hosted on the .well-known folder and the root folder on the server and the content type is json.

  2. The file has the following format:

{
  "webcredentials": {
    "apps": [
      "TeamID.bundleId"
    ]
  },
  "applinks": {
    "apps": [],
    "details": [
      {
        "appID": "TeamID.bundleId",
        "paths": [
          "/reset-password/*",
          "/confirm-email/*"
        ]
      },
      {
        "appIDs": [
          "TeamID.bundleId"
        ],
        "components": [
          { "/": "/reset-password/*" },
          { "/": "/confirm-email/*" }
        ]
      }
    ]
  }
}
  1. We added the corresponding associated domain on the project code

As I said before, it works fine most of the times but some random cases it doesn't. My suspicious is that the aasa file can't be downloaded in the cases that failed but I'm not sure about it.

Anyone experience the same kind of issue? Any help is much appreciated.

question from:https://stackoverflow.com/questions/65645013/ios-apple-universal-links-fails-randomly

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
334 views
Welcome To Ask or Share your Answers For Others

1 Answer

Universal links opening is not very easy process.

First - if it is a fresh app instal and was not opened yet - system (iOS) doesn't know about your app is support UL - app must be started at least one time.

Next one - it's up to user (and system decision) how to open links - user can get question about opening of UL through the app - and decide not to use this option - it'll be opened in browser, and system can now always open these ULs in browser, and vice versa if user open it using app. After it it's very hard to change the behavior.

AASA file downloads on app start and as I tested it before - it stores in system until next one will be downloaded (updated), so if sometimes app it can't be downloaded - there is nothing changed (except if it was first launch and first try to download aasa file.

Some issues can be if you try to open some links not presented in aasa file, but I think it's not your case.

Your aasa file has no problems.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...