Contextual information that the system provides while it performs an app intent.
Access information that the system provides to your app intent while it performs its action in its ``AppIntent/perform()`` implementation.
The available information varies by platform. For example, in watchOS, the intent system context
includes a precise timestamp
when a person starts the app intent's action using the Action button on Apple Watch Ultra.
Members (4)
get · iOS 26.0+
currentMode
TypeScript
get currentMode(): IntentModes_Current
Swift declaration
var currentMode: IntentModes.Current { get }
A value that indicates the foreground and background behavior for app intent's action.
This value indicates whether the intent is running in the background or foreground, and
the current ``IntentModes/ForegroundMode`` option if it requires the app to be in the foreground.
When handling an app intent that supports both foreground and background modes, use this
property to check the current run mode before making any adjustments, as shown in the
following example from an app intent type:
```swift
func perform() async throws -> some IntentResult {
if systemContext.currentMode.canContinueInForeground {
// Perform actions if it's OK for the app intent to request
// to appear in the foreground if necessary.
try await continueInForeground()
}
return .result()
}
```
get · iOS 27.0+
isVoiceOnly
TypeScript
get isVoiceOnly(): boolean
Swift declaration
var isVoiceOnly: Bool { get }
A Boolean value that indicates whether the system performs the app intent in a voice-only context.
If ``isVoiceOnly`` is `true`, adjust the intent's result to include a more speakable summary,
and make sure a person can understand responses and dialog without visuals such as tables, graphics, or other user-interface elements.
Generally, return an ``IntentDialog`` from your intent. The system can
choose the best information from the dialog to present for a person's context.
Consult ``isVoiceOnly`` when your app intent returns dynamic, free-form output, such as
generated recommendations, summarized search results, or natural-language responses
you generate on the fly.
get · iOS 16.0+
preciseTimestamp
TypeScript
get preciseTimestamp(): (globalThis.Date) | null
Swift declaration
var preciseTimestamp: Date? { get }
A precise timestamp for the performed action.
The system records this timestamp when a person starts the app intent's action using the Action button on Apple Watch Ultra.
get · iOS 27.0+
locale
TypeScript
get locale(): _Foundation_Locale
Swift declaration
var locale: Locale { get }
The locale in which the system performs the app intent.
The locale for a person's request can differ from the app's current locale in a few cases:
- A person makes a request in a language that's different from the system's locale.
- A person creates a custom shortcut in the Shortcuts app that uses a locale different from their system locale.
Where possible, use ``LocalizedStringResource`` APIs to localize app intents and let the system choose the right locale as needed.
If localized string resources aren't an option — for example, when you generate content on a server or on device using generative models and
can't easily localize results in the app — use the ``locale`` property as context to provide intent results that match the person's locale.