How to use a phrase like "Open \(\.target)) in \(.applicationName)" when using a book domain app intent like `.books.open`?

Generated on 5/26/2025

1 search

Tailscan

This post is brought to you by Tailscan, the best devtool for Tailwind CSS.

To use a phrase like "Open (.target)) in (.applicationName)" when using a book domain app intent like .books.open, you would typically define an app intent that includes parameters for the target and application name. This can be structured as an app shortcut, which wraps the intent and allows you to pre-fill some or all of the parameters.

In the session Bring your app’s core features to users with App Intents, it is explained that app shortcuts can be created by wrapping an intent instance, allowing you to specify phrases that include the app name. This is particularly useful for Siri and visual displays like Spotlight, where the phrase must contain the app name.

Additionally, in the session Design App Intents for system experiences, it is mentioned that app intents can open the app to a specific view, which is relevant when you want to show changes made by the intent. This behavior can be toggled on or off, depending on whether you want the app to open as part of the intent execution.

For more detailed guidance on structuring app intents and using them effectively, you can refer to the chapters "Structuring App Intents" in the session "Design App Intents for system experiences" and "Building the code" in the session "Bring your app’s core features to users with App Intents".

Design App Intents for system experiences

Design App Intents for system experiences

App Intents power system experiences in controls, Spotlight, Siri, and more. Find out how to identify the functionality that’s best for App Intents, and how to use parameters to make these intents flexible. Learn how to use App Intents to allow people to take action outside your app, and see examples of when to navigate into your app to show contextual information.

Bring your app’s core features to users with App Intents

Bring your app’s core features to users with App Intents

Learn the principles of the App Intents framework, like intents, entities, and queries, and how you can harness them to expose your app’s most important functionality right where people need it most. Find out how to build deep integration between your app and the many system features built on top of App Intents, including Siri, controls and widgets, Apple Pencil, Shortcuts, the Action button, and more. Get tips on how to build your App Intents integrations efficiently to create the best experiences in every surface while still sharing code and core functionality.

What’s new in App Intents

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.