×

Log Workout

Notes

Logs a workout to the health app.

Syntax

logWorkout(type: <#Type (WFWorkoutReadableActivityType)#>, date: <#Date#>, duration: <#Time#>, calories: <#Quantity#>, distance: <#Quantity#>)

Example

logWorkout(type: Cycling, date: December 1st 2020, duration: 10 Minutes, calories: 214 cal, distance: 1 mi)