Quick Tip: Universal Links opening Safari in iOS13

I recently encountered a problem with Universal Links on iOS and found that many people have been experiencing the same issue on iOS 13 in forums and Stack Overflow threads. However, there hasn’t been a precise or satisfactory answer. So, I decided to write this quick tip to help those people.

Universal Links are controlled by SWC on iOS (if you want to see the logs for that service in Console, look for the swcd process).

The SWC has a little-known and poorly documented way of working, so I will explain step-by-step how the SWC makes the connection of a domain to an app.

  • When installing an app, iOS validates that it has an Associated Domain, and in the case of Universal Links, an applink in its entitlement.
  • If so, it sends it to the SWC to be processed.
  • The SWC has a list of important TLDs. TLDs (Top-Level Domains) are the famous .com, .net, .org that we see in website domains.
  • If your applink has an important TLD, it runs immediately in the foreground.
  • If your applink does not have an important TLD, it’s placed in a background queue.
  • When possible, your applink will be processed, and if it complies with Apple’s demands, iOS will link the domain with your app.

Some important details need to be analyzed.

The important TLDs are defined based on the user’s region.

#blindPeople: the image shows the important TLDs for Apple’s SWC: .com, .org, .net.

Some apps have an international scope, like Google, for example. In those apps, there are several domains (.com, .co.uk, .nl, etc.) built into one compilation.

So imagine an app like Google’s, with all possible domains. It’s a huge list.

For this reason, iOS has a list of important TLDs, which are processed immediately when the app is installed.

That way, domains relevant to your country are run first. For example, if I am in England, .co.uk domains will be processed immediately, and the rest (such as those from China, France, etc.) will be processed later.

The domains put in the background will be processed (some hour, some day)

#blindPeople: the image shows that the domain news.apple.com has an important TLD.

When your domain is placed to be processed in the background, iOS will process it when possible.

The time it will run can vary depending on many OS variables and available resources, such as network availability, battery, processing time, etc. Another important point is the number of applications that the user has installed, and the number of applinks that those applications have to be processed.

Therefore, it is impossible to say when your applink will be processed and be ready for use.

The golden tip

The golden (and undocumented) tip for Universal Links is: if you want your applink to be processed immediately, use an “important” domain.

Many apps use their own domains or generic domains (like .me, .link, etc.). If this is the case, wait for the OS to process your applink, or consider changing or adding a new domain for your Universal Links.

I hope I helped a lot of people, and if anyone has any more problems that I can help with, don’t forget to tell me 😉.