A request to start a workout for the user.
SDKs
- iOS 10.0+
- Mac Catalyst 13.0+
- watchOS 3.2+
Framework
- Intents
Declaration
@interface INStartWorkoutIntent : INIntent
Overview
SiriKit creates an INStart
object when the user asks to start a workout using your app. A start workout intent identifies the user-selected workout type and goals.
To handle this intent, the handler object in your Intents extension must adopt the INStart
protocol. Your handler should confirm the request and create an INStart
object that indicates it’s possible to start the workout. For the successful handling of the intent, SiriKit launches your app and passes it an NSUser
object your app must then use to start the workout.
Additional Intent Attributes
Table 1 lists additional attributes of this intent object.
Start workout intent attributes
Attribute | Description |
---|---|
Supported by | Siri Intents, Siri Suggestions |
Always requires unlocked device | Yes |
Example Phrases
Users can ask Siri to start a workout in a variety of ways. Table 2 provides a few sample phrases in different languages. You can use these phrases during testing to trigger your intents. This list isn’t exhaustive and Siri may recognize many other phrases.
Siri phrases that trigger the starting of a workout
Locale | Example 1 | Example 2 |
---|---|---|
en | Start a run in <appName> | |
zh_CN | 用<appName>开始跑步 | 用<appName>开始跑步 |
zh_HK | 用動動開始跑步 | 用動動開始健身 |
zh_TW | 用<appName>開始跑步 | 用<appName>開始健身 |
yue_CN | 用动动开始跑步 | 用动动开始健身 |
ar | ابدأ تمرين الركض في <appName> | |
da | start en løbetur med <appName> | Start cykeltræninig i <appName> |
de | Starte ein Lauftraining in <appName> | Laufen starten in <appName> |
es | Inicia una carrera con <appName> | Inicia una rutina de natación en <appName> |
fi | Aloita <appName> juoksu | Menen <appName> kävelylle |
fr | Démarre un footing avec <appName> | Lance une course à pied en utilisant <appName> |
he | תתחיל ריצה באמצעות <appName> | תתחילי אימון הליכה ב<appName> |
it | Inizia una corsa usando <appName> | Inizia una passeggiata outdoor con <appName> |
ja | <appName>でランニングを開始 | <appName>でランニングをスタート |
ko | <appName>에서 달리기 시작해 | <appName>으로 수영 시작 |
ms | Mulakan larian pada <appName> | Mulakan mendayung guna <appName> |
nb | Start en løpetur med <appName> | Start sykkeltrening i <appName> |
nl | Start een hardloopsessie in <appName> | Ik wil beginnen met fietsen met <appName> |
pt | Inicia uma corrida usando <appName> | Começar exercício de bicicleta no <appName> |
ru | Начать пробежку в <appName> | Старт забега в <appName> |
sv | initiera ett 40 sekunder lång fitnesspass | starta upp fitness |
th | เริ่มวิ่งด้วย <appName> | เริ่มต้นการปั่นจักรยาน 30 นาทีด้วย <appName> |
tr | <appName> ile 5 dakikalık koşu başlat | 5 dakikalık <appName> koşusu başlat |
In Table 2, <appName> represents the name of the app whose Intents extension starts the workout. If your app uses specific names for workouts, you can tell Siri about those names using the INVocabulary
class.