A request to cancel an active workout.
SDKs
- iOS 10.0+
- watchOS 3.2+
Framework
- Intents
Declaration
class INCancelWorkoutIntent : INIntent
Overview
SiriKit creates an INCancel
object when the user asks to cancel a currently running workout. Canceling a workout stops the workout and does not record any progress toward the workout goals. Use this intent object to get the workout parameters.
To handle this intent, the handler object in your Intents extension must adopt the INCancel
protocol. Your handler should confirm the request and create an INCancel
object to indicate that it is possible to cancel the workout. For the successful handling of the intent, SiriKit launches your app and passes it an NSUser
object that your app must then use to cancel the workout.
Additional Intent Attributes
Table 1 lists additional attributes of this intent object.
Cancel 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 cancel 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.
Siri phrases that trigger the cancellation of a workout
Locale | Example 1 | Example 2 |
---|---|---|
en | Cancel my workout in <appName> |
|
zh_CN | 用<appName>取消跑步 |
|
zh_HK | 用動動取消跑步 | 用動動停止跑步 |
zh_TW | 用<appName>取消訓練 |
|
yue_CN | 用动动取消跑步 | 用动动停止跑步 |
ar | إلغاء التمرين في <appName> |
|
da | annuller min <appName> workout |
|
de | Breche mein <appName> Training ab | Training abbrechen in <appName> |
es | Cancela mi entrenamiento de <appName> | Cancela mi rutina en <appName> |
fi | Peru <appName> harjoitus | Peruuta <appName> harjoittelu |
fr | Annule mon entrainement sur <appName> | Sors de mon entrainement sur <appName> |
he | תבטל אימון באמצעות <appName> |
|
it | Cancella il mio allenamento in <appName> |
|
ja | <appName>のワークアウトをキャンセル | <appName>のワークアウトを中止 |
ko | <appName>에서 달리기 취소해 | <appName>으로 수영 취소 |
ms | Batalkan latihan berbasikal dengan <appName> | Batalkan senaman <appName> |
nb | Avbryt treningen med <appName> | Avbryt <appName> treningen |
nl | Annuleer mijn work-out in <appName> | Kun je mijn activiteit in <appName> afbreken |
pt | Cancelar meu exercício no <appName> | Cancela minha atividade do <appName> |
ru | Отмени мою поездку на велосипеде с <appName> | Отмени тренировку в <appName> |
sv |
|
|
th | หวัดดี Siri ยกเลิกขี่จักรยานด้วย <appName> |
|
tr | <appName> koşusunu iptal et | <appName>'deki koşuyu iptal et |
In the preceding examples, <appName> represents the name of the app whose Intents extension cancels the workout. If your app uses specific names for workouts, you can tell Siri about those names using the INVocabulary
class.