How does Associated Domains Development works on watchOS?

How does Associated Domains Development work on watchOS? In comparison, on iOS we have Diagnostics menu that allows to input a link and test the setup. How to achieve the same on a watch?

watchOS:

iOS:

Answered by DTS Engineer in 883701022

Thank you for the post. Associated Domains work the same in the watchOS. There is an important note:

https://developer.apple.com/documentation/xcode/supporting-associated-domains#Add-the-associated-domains-entitlement-to-your-app

For a single-target watchOS apps, add the Associated Domains capability to the watchOS app target. For watchOS apps with separate WatchKit extensions, you must add the Associated Domains capability to the WatchKit Extension target.

Because the Apple Watch lacks a traditional web browser and has a smaller screen, testing and diagnosing Associated Domains (like Universal Links) requires a slightly different workflow. Just like on iOS, if your apple-app-site-association (AASA) file is hosted on a local server or a dev environment not reachable by Apple's CDN. Since you cannot paste a link into a Diagnostics menu, you have to trigger the link exactly how a user would encounter it on their wrist. The most reliable way to test is to use the Messages or Mail app. Send the Universal Link to yourself. Open the Messages app on your Apple Watch, tap the link, and verify that it deep-links directly into your watchOS app rather than suggesting a web view or Handoff.

Do you have any specific question?

Albert
  Worldwide Developer Relations.

Accepted Answer

Thank you for the post. Associated Domains work the same in the watchOS. There is an important note:

https://developer.apple.com/documentation/xcode/supporting-associated-domains#Add-the-associated-domains-entitlement-to-your-app

For a single-target watchOS apps, add the Associated Domains capability to the watchOS app target. For watchOS apps with separate WatchKit extensions, you must add the Associated Domains capability to the WatchKit Extension target.

Because the Apple Watch lacks a traditional web browser and has a smaller screen, testing and diagnosing Associated Domains (like Universal Links) requires a slightly different workflow. Just like on iOS, if your apple-app-site-association (AASA) file is hosted on a local server or a dev environment not reachable by Apple's CDN. Since you cannot paste a link into a Diagnostics menu, you have to trigger the link exactly how a user would encounter it on their wrist. The most reliable way to test is to use the Messages or Mail app. Send the Universal Link to yourself. Open the Messages app on your Apple Watch, tap the link, and verify that it deep-links directly into your watchOS app rather than suggesting a web view or Handoff.

Do you have any specific question?

Albert
  Worldwide Developer Relations.

Thanks, Apple. A thing to note: I tried to test my links through Notes, that works on iOS but not on watchOS. On watch only Mail and Messages do work!

How does Associated Domains Development works on watchOS?
 
 
Q