One Logo Pool Ball
AppIntents · IOS API REFERENCE

PauseWorkoutIntent

protocol · iOS 16.0+ · SDK 27.1

protocol PauseWorkoutIntent : SystemIntent

An App Intent that lets someone pause your app's current workout session. On Apple Watch Ultra, someone can pause your workout by simultaneously pressing the Action button and the side button while your app is running a workout session. To implement the pause action, create a structure that adopts the `PauseWorkoutIntent` protocol. ```swift struct MyPauseWorkoutIntent: PauseWorkoutIntent { static var title: LocalizedStringResource = "Pause Workout" func perform() async throws -> some IntentResult { logger.debug("*** Performing a pause intent. ***") await MyWorkoutManager.shared.pauseWorkout() return .result() } } ``` This intent needs a ``AppIntents/AppIntent/title`` property that provides a localized description of the action, and a ``AppIntents/AppIntent/perform()`` method, which the system calls when it triggers the intent. For more information, see <doc:ActionButtonArticle>.

Members (0)

This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.

Skipped declarations

No declarations were skipped in this snapshot.

All AppIntents types →