Create, preview, and sync workouts for use in the Workout app on Apple Watch.
- Note: This sample code project is associated with WWDC23 session 10016: Build custom workouts with WorkoutKit and WWDC24 session 10084: Build custom swimming workouts with WorkoutKit.
Before you run the sample code project in Xcode:
- Open the sample with the latest version of Xcode.
- Select the top-level project.
- Click the target and select a team in the Signing & Capabilities pane.
To run the sample code project in Xcode:
- Make a clean build and run the sample app on an iPhone with iOS 18 or later.
- Tap the calendar icon in the top right of the sample app and select a workout type.
- Open the Workout app on a paired Apple Watch running watchOS 11 or later.
- The planned workout appears at the top of the Workout list on the watch.
- Tap to begin the workout.
- Wait at least 1 minute for the Workout app to complete the workout.
- End the workout.
- In the sample app, swipe the Workout list to refresh the view.
- A green checkmark appears next to the completed workout.