How to generate .workout files

The WWDC23 session number 10016 is referring to a way to generate .workout files (timecode 09:43) in both binary and JSON format.

Unfortunately, the API seems to have changed:

  • CustomWorkoutComposition renamed to CustomWorkout
  • .dataRepresentation disappeared

Ideally I would like to generate .workout files directly in JSON format but there is no specifications published and no documentation to generate them.

Any idea where I should look?

.workout files represent WorkoutPlan. These files can only be imported and exported in a binary format at this time.

See the WorkoutKit documentation for more info: https://developer.apple.com/documentation/workoutkit/workoutplan

How to generate .workout files
 
 
Q