Class

INEndWorkoutIntent

A request to end the current workout that also validates workout parameters and saves the results.

Declaration

@interface INEndWorkoutIntent : INIntent

Overview

SiriKit creates an INEndWorkoutIntent object when the user asks to finish an in-progress workout. Finishing a workout stops it and records any progress made toward the workout’s goals. Use this intent object to validate the workout parameters.

To handle this intent, the handler object in your Intents extension must adopt the INEndWorkoutIntentHandling protocol. Your handler should confirm the request and create an INEndWorkoutIntentResponse object that indicates it’s possible to end the workout. For the successful handling of the intent, SiriKit launches your app and passes it an NSUserActivity object your app must then use to end the workout.

Additional Intent Attributes

Table 1 lists additional attributes of this intent object.

Table 1

End workout intent attributes

Attribute

Description

Supported by

Siri Intents, Siri Suggestions

Always requires unlocked device

Yes

Example Phrases

Users can ask Siri to end a workout in a variety of ways. Table 2 provides a few sample phrases in different languages in a variety of ways. You can use these phrases during testing to trigger your intents. This list isn’t exhaustive and Siri may recognize many other phrases.

Table 2

Siri phrases that trigger the ending of a workout

Locale

Example 1

Example 2

en

Stop my workout in <appName>

zh_CN

在<appName>中结束体能训练

在<appName>中结束跑步

zh_HK

用動動結束健身

結束動動健身

zh_TW

<appName>結束訓練

用<appName>結束跑步

yue_CN

用动动结束健身

结束运动健身

ar

نهاية ركوب الدراجة على <appName>

da

stop cykling med <appName>

Stop træning i <appName>

de

<appName> Training beenden

Beende <appName> Training

es

Detener mi entreno de <appName>

Detén mi rutina de <appName>

fi

Lopeta <appName> harjoitus

<appName> harjoitus on valmis

fr

Terminer ma course <appName>

Arrêter l'entraînement sur <appName>

he

עצור אימון ב<appName>

it

Ferma il mio allenamento in <appName>

Termina il mio esercizio con <appName>

ja

<appName>のワークアウトを終了

<appName>のワークアウトをストップ

ko

<appName>에서 달리기 끝내

<appName>으로 수영 종료

ms

Hentikan menunggang basikal dengan <appName>

Hentikan senaman pada <appName>

nb

Stopp treningen i <appName>

Avslutt <appName> treningen

nl

Stop mijn work-out in <appName>

Kun je mijn activiteit in <appName> beëindigen

pt

Parar meu exercício no <appName>

Pare minha atividade do <appName>

ru

Закончить мою прогулку на велике с <appName>

Остановить пробежку в <appName>

sv

Stoppa cykling med <appName>

Stäng av <appName> träningen

th

หยุดวิ่งด้วย <appName>

หวัดดี Siri หยุดวิ่งใน <appName> ให้ฉันหน่อยสิ

tr

<appName> koşusunu durdur

koşuyu durdur <appName>

In Table 2, <appName> represents the name of the app whose Intents extension ends 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

- initWithWorkoutName:

Initializes an intent object with the specified workout name.

Specifying Workout Details

workoutName

The name of the workout.

Relationships

Inherits From

See Also

End a Workout

INEndWorkoutIntentHandling

An interface that handles requests to complete a workout.

INEndWorkoutIntentResponse

Your app’s response to an end workout intent.