Class

INPauseWorkoutIntent

A request to pause the current workout.

Overview

SiriKit creates an INPauseWorkoutIntent object when the user asks to pause a currently running workout. Pausing a workout stops the gathering of workout data without clearing any information related to the current workout progress. Use this intent object to validate the workout parameters.

To handle this intent, the handler object in your Intents extension must adopt the INPauseWorkoutIntentHandling protocol. Your handler should confirm the request and create an INPauseWorkoutIntentResponse object to indicate that it is possible to pause the workout. For the successful handling of the intent, SiriKit launches your app and passes it an NSUserActivity object that your app must then use to pause the workout.

Additional Intent Attributes

Table 1 lists additional attributes of this intent object.

Table 1

Pause workout intent attributes

Attribute

Description

Supported by

Siri

Always requires unlocked device

Yes

Example Phrases

There are many ways in which users can ask Siri to pause a workout. Table 2 provides a few sample phrases in different languages. You can use these phrases during testing to trigger your intents. This list is not exhaustive and Siri may recognize many other phrases.

Table 2

Siri phrases that trigger the pausing of a workout

Locale

Example 1

Example 2

en

Pause my workout in <appName>

zh_CN

暂停<appName>跑步

zh_HK

用動動暫停健身

zh_TW

<appName>暫停訓練

yue_CN

用动动暂停健身

ar

ايقاف مؤقت للتمرين في <appName>

توقف مؤقت التمرين

da

pause min træning

de

Meinen <appName> Workout pausieren

Meinen <appName> Workout unterbrechen

es

Pausa mi entreno de <appName>

Pausar mi entranamiento en <appName>

fi

Keskeytä <appName> harjoittelu

Pidä tauko <appName> treenissä

fr

Mets en pause mon entrainement sur <appName>

Mettre en pause l'entrainement <appName>

he

השהה אימון באמצעות <appName>

it

Metti in pausa il mio allenamento in <appName>

ja

<appName>のワークアウトを一時停止

<appName>のワークアウトを中断

ko

<appName>에서 달리기 잠시 중지해

<appName>으로 수엉 일시 중지해

ms

Jedakan latihan dalam <appName>

Jeda senaman di <appName>

nb

Pause treningen i <appName>

Pause <appName> treningen

nl

Pauzeer mijn work-out in <appName>

Kun je mijn activiteit in <appName> onderbreken

pt

Pausar meu exercício no <appName>

Pause minha atividade do <appName>

ru

Приостанови тренировку в <appName>

Тренировку в <appName> на паузу

sv

pausa min träning

th

พักวิ่งใน <appName>

tr

<appName> koşusunu duraklat

koşuyu duraklat <appName>

In the preceding examples, <appName> represents the name of the app whose Intents extension pauses the workout. If your app uses specific names for workouts, you can tell Siri about those names using the INVocabulary class.

Topics

Creating the Intent Object

init(workoutName: INSpeakableString?)

Initializes an intent object with the specified workout name.

Specifying Workout Details

var workoutName: INSpeakableString?

The name of the workout.

Relationships

Inherits From

Conforms To

See Also

Pause a Workout

protocol INPauseWorkoutIntentHandling

The handler interface for pausing a workout.

class INPauseWorkoutIntentResponse

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