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:
-
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.
-
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. -
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 anOpenTrailIntent
that targets aTrailEntity
and conforms toURLRepresentableIntent
. -
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:
- What’s new in App Intents (Universal links)
- What’s new in App Store Connect (Deep links for custom product pages)
Relevant Sessions
-
What’s new in App Intents
- Introduction
- Spotlight integration
- Entities and files
- Universal links
- Developer improvements
-
What’s new in App Store Connect
- Introduction
- Get discovered
- Test your app
- Reach customers
What’s new in App Store Connect
Explore new features for discovery, testing, and marketing. Find out how to nominate your apps for featuring on the App Store, share exciting moments (like a version launch) with marketing assets generated for you, deep link to specific content in your app from custom product pages, use the latest enhancements to TestFlight, and more.
Evolve your document launch experience
Make your document-based app stand out, and bring its unique identity into focus with the new document launch experience. Learn how to leverage the new API to customize the first screen people see when they launch your app. Utilize the new system-provided design, and amend it with custom actions, delightful decorative views, and impressive animations.
What’s new in App Intents
Learn about improvements and all-new features with App Intents, and discover how this framework can help you expose your app’s functionality to Siri, Spotlight, Shortcuts, and more. We’ll show you how to make your entities more meaningful to the platform with the Transferable API, File Representations, new IntentFile APIs, and Spotlight Indexing, opening up powerful functionality in Siri and the Shortcuts app. Empower your intents to take people deep into your app with URL Representable Entities. Explore new techniques to model your entities and intents with new APIs for error handling and union values.