How to adopt universal links

Generated on 7/31/2024

1 search

To adopt universal links in your app, you can follow the guidance provided in the WWDC sessions. Here are the key steps and concepts:

  1. Define Universal Links: Universal links help people access your content, whether or not they have your app installed. You can represent your app entities, enums, and intents as having a URL representation. This allows Siri and shortcuts to treat them like links to specific content, enabling actions to open the URL or making them shareable.

  2. URL Representable Entities: Extend your app entities to support URL representable entities. For example, you can provide a static URL representation using your universal link as the template. You can use an entity's identifier or any of its properties with the @property attribute as interpolations in the URL string.

  3. App Intents Integration: Create intents that conform to URLRepresentableIntent. This allows your app to handle the URL and perform the necessary actions. For instance, you can create an OpenTrailIntent that targets a TrailEntity and conforms to URLRepresentableIntent.

  4. Deep Links in App Store Connect: You can also use deep links for custom product pages in App Store Connect. This allows you to customize where someone lands when they open your app from a custom product page. These deep links can be any custom URL or a universal link recognized by your app's code.

For more detailed information, you can refer to the following sessions and chapters:

Relevant Sessions

  1. What’s new in App Intents

    • Introduction
    • Spotlight integration
    • Entities and files
    • Universal links
    • Developer improvements
  2. What’s new in App Store Connect

    • Introduction
    • Get discovered
    • Test your app
    • Reach customers