Workouts

Start, end, and manage fitness routines.

Overview

Users can start, pause, resume, cancel, or end workouts using Siri. Your Intents app extension directs any workout-related requests to your app, which manages the actual workouts. SiriKit automatically asks the user to unlock their device, as needed, before launching your app.

You can provide a custom interface for workout-related intents using an Intents UI app extension.

Figure 1

Starting a workout from Siri

Starting a workout from Siri

Topics

First Steps

protocol INWorkoutsDomainHandling

An interface for adopting all of the protocols in the workouts domain.

Start a Workout

protocol INStartWorkoutIntentHandling

The handler interface for starting a workout.

class INStartWorkoutIntent

A request to start a workout for the user.

class INStartWorkoutIntentResponse

Contains your app’s response to a start workout intent.

Pause a Workout

protocol INPauseWorkoutIntentHandling

The handler interface for pausing a workout.

class INPauseWorkoutIntent

A request to pause the current workout.

class INPauseWorkoutIntentResponse

Contains your app’s response to a pause workout intent.

Resume a Workout

protocol INResumeWorkoutIntentHandling

The handler interface for resuming a workout.

class INResumeWorkoutIntent

A request to resume a paused workout.

class INResumeWorkoutIntentResponse

Contains your app’s response to a resume workout intent.

Cancel a Workout

protocol INCancelWorkoutIntentHandling

The handler interface for cancelling a workout.

class INCancelWorkoutIntent

A request to cancel an active workout.

class INCancelWorkoutIntentResponse

Contains your app’s response to a cancel workout intent.

End a Workout

protocol INEndWorkoutIntentHandling

The handler interface for completing a workout.

class INEndWorkoutIntent

A request to end the current workout and saves the results.

class INEndWorkoutIntentResponse

Contains your app’s response to an end workout intent.

Data Objects

struct INWorkoutNameIdentifier

Constants indicating the type of workout.

enum INWorkoutGoalUnitType

Constants describing the unit of measure for a workout.

enum INWorkoutLocationType

Constants describing the location of a workout.

Resolution Results

class INWorkoutGoalUnitTypeResolutionResult

A resolution result for the units of a workout goal.

class INWorkoutLocationTypeResolutionResult

A resolution result for the type of location where the workout occurs.

See Also

Intent Domains

Messaging

Send messages and search the user's received messages.

Lists and Notes

Create and manage notes and to-do list items.

Payments

Send payments between users or pay bills.

VoIP Calling

Initiate calls and search the user's call history.

Visual Codes

Convey contact and payment information using Quick Response (QR) codes.

Photos

Search for and display photos.

Ride Booking

Book rides and report their status.

Car Commands

Manage vehicle door locks and get the vehicle's status.

CarPlay

Interact with a vehicle's CarPlay system.

Restaurant Reservations

Create and manage restaurant reservations with help from the Maps app.