Reasons for the cancellation of an app intent’s operation.
This type contains the possible reasons for the cancellation of an app intent. You don’t
create instances of this type yourself. Instead, you receive a value in the cancellation
handler you pass to the ``CancellableIntent/withIntentCancellationHandler(operation:onCancel:isolation:)``
method when running your app intent’s code. Use the reason to make decisions about how
to respond to the cancellation.
Members (3)
get · iOS 26.4+
userCancelled
TypeScript
static get userCancelled(): IntentCancellationReason
Swift declaration
static var userCancelled: IntentCancellationReason { get }
An option that indicates someone explicitly canceled the intent.
While an app intent’s task runs, system interfaces such as Siri, Live Activities, and
Shortcuts can show UI with the current progress. These interfaces also include a way
to cancel the task. This option reflects direct cancellation by a person using one
of these interfaces.
get · iOS 26.4+
debugDescription
TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }
A textual representation of this instance, suitable for debugging.
Calling this property directly is discouraged. Instead, convert an
instance of any type to a string by using the `String(reflecting:)`
initializer. This initializer works with any type, and uses the custom
`debugDescription` property for types that conform to
`CustomDebugStringConvertible`:
struct Point: CustomDebugStringConvertible {
let x: Int, y: Int
var debugDescription: String {
return "(\(x), \(y))"
}
}
let p = Point(x: 21, y: 30)
let s = String(reflecting: p)
print(s)
// Prints "(21, 30)"
The conversion of `p` to a string in the assignment to `s` uses the
`Point` type's `debugDescription` property.
get · iOS 26.4+
timeout
TypeScript
static get timeout(): IntentCancellationReason
Swift declaration
static var timeout: IntentCancellationReason { get }
An option that indicates the app intent exceeded the allowed time limit without
reporting progress.
When an app intent runs on iOS, iPadOS, tvOS, visionOS, or watchOS, it has a default
timeout of around 30 seconds. If the app intent doesn’t report progress during this
time, the system can cancel the operation.