WorkoutKit builds and schedules custom workouts for Health and Fitness apps on iOS, macOS, and watchOS. You compose a CustomWorkout from IntervalBlock and IntervalStep values, or use prebuilt structures such as SingleGoalWorkout, PacerWorkout, and SwimBikeRunWorkout, setting targets with WorkoutGoal. Each step can carry alerts conforming to WorkoutAlert, including HeartRateRangeAlert, CadenceThresholdAlert, PowerZoneAlert, and SpeedRangeAlert, to cue the user on cadence, heart rate, power, and speed. Wrap a workout in a WorkoutPlan and use ScheduledWorkoutPlan with WorkoutScheduler to schedule it for delivery.
Custom Workouts 5
Compose a workout from interval blocks and steps, each with a goal.
- StCustomWorkoutiOS 17.0+A structure that composes a workout from interval blocks and steps with targets.
- StIntervalBlockiOS 17.0+A structure that groups repeated interval steps into a block of a workout.
- StIntervalStepiOS 17.0+A structure that defines a single interval of work or recovery with a goal.
- StWorkoutStepiOS 17.0+A structure that represents a single step within a workout with an optional goal and alert.
- EnWorkoutGoaliOS 17.0+Constants that specify a workout target, such as distance, time, energy, or open-ended.
Prebuilt Workout Structures 3
Ready-made workout templates for common training formats.
- StSingleGoalWorkoutiOS 17.0+A prebuilt workout built around a single distance, time, or energy goal.
- StPacerWorkoutiOS 17.0+A prebuilt workout that paces the user toward a goal over a set distance or time.
- StSwimBikeRunWorkoutiOS 17.0+A prebuilt multisport workout combining swim, bike, and run segments.
Heart Rate, Cadence, and Power Alerts 11
Alerts that cue the user when a metric leaves a target range, threshold, or zone.
- PrWorkoutAlertiOS 17.0+A protocol for alerts that cue the user when a workout metric meets a defined condition.
- StHeartRateRangeAlertiOS 17.0+An alert that cues the user when heart rate falls outside a target range.
- StHeartRateZoneAlertiOS 17.0+An alert that cues the user when heart rate leaves a specified zone.
- StCadenceRangeAlertiOS 17.0+An alert that cues the user when cadence falls outside a target range.
- StCadenceThresholdAlertiOS 17.0+An alert that cues the user when cadence crosses a threshold value.
- StPowerRangeAlertiOS 17.0+An alert that cues the user when power output falls outside a target range.
- StPowerThresholdAlertiOS 17.0+An alert that cues the user when power output crosses a threshold value.
- StPowerZoneAlertiOS 17.0+An alert that cues the user when power output leaves a specified zone.
- StSpeedRangeAlertiOS 17.0+An alert that cues the user when speed falls outside a target range.
- StSpeedThresholdAlertiOS 17.0+An alert that cues the user when speed crosses a threshold value.
- EnWorkoutAlertMetriciOS 17.0+Constants that identify the metric an alert monitors, such as heart rate, cadence, or power.
Plans and Scheduling 3
Wrap a workout in a plan and schedule it for delivery to the user's devices.
- StWorkoutPlaniOS 17.0+A structure that wraps a workout for scheduling and delivery to the user.
- StScheduledWorkoutPlaniOS 17.0+A structure that pairs a workout plan with a date for scheduled delivery.
- ClWorkoutScheduleriOS 17.0+An object that schedules workout plans for delivery to the user's devices.
Errors 1
Errors reported when scheduling or workout state is invalid.
- EnStateErroriOS 17.0+Constants that describe errors arising from an invalid workout or scheduling state.