Should a URL be a string?
Asked on 08/04/2024
1 search
Yes, a URL can be represented as a string in the context of app intents. In the session What’s new in App Intents, it is explained that you can express your app entity, app enum, and app 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.
For example, you can use an entity's identifier or any of its properties with the @property
attribute as interpolations in the URL string. This is further elaborated in the same session at another timestamp, where it is shown how to use a universal link as a template and interpolate the entity's identifier into the URL string.
Relevant Sessions

Build multilingual-ready apps
Ensure your app works properly and effectively for multilingual users. Learn best practices for text input, display, search, and formatting. Get details on typing in multiple languages without switching between keyboards. And find out how the latest advances in the String Catalog can make localization even easier.

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.

What’s new in Wallet and Apple Pay
Take passes and payments to the next level with new enhancements to Wallet and Apple Pay. Make your event tickets shine with rich pass designs in Wallet, and bring great Apple Pay experiences to even more people with third-party browser support. We’ll also look at how to disburse funds with Apple Pay on the Web and highlight new API changes that help you integrate Apple Pay into even more purchasing flows.