How do I build a workout app on watch?

Asked on 2024-07-30

1 search

To build a workout app on Apple Watch, you can leverage the capabilities of WorkoutKit, which allows you to create and sync various types of workouts directly to the workout app on Apple Watch. Here are the steps and features you can use:

  1. Create Different Types of Workouts:

    • Goal-based Workouts: Users can perform workouts with a singular goal for energy, time, or distance.
    • Pacer Workouts: Focus on pace.
    • Triathlon Workouts: Seamlessly transition between swim, bike, and run activities.
    • Custom Workouts: Structured steps with a combination of custom goals and alerts.
  2. Custom Pool Swimming Workouts:

    • You can create custom swimming workouts by specifying the activity, adding a display name, and pooling all steps together.
    • Use the workout scheduler API to schedule workouts.
    • The app can prompt for pool length to get accurate lap distance measurements and convert distances if the pool length doesn't match the workout intervals.
  3. New Features in watchOS 11:

    • Distance with Time Goal: Allows a workout step to have both a distance goal and a time goal.
    • Custom Step Names: Customize the name of your work, recovery, warmup, and cooldown steps using the new display name property.
  4. User-Selectable Workout Locations:

    • Starting in watchOS 10.1, you no longer need to specify between indoor and outdoor location types when scheduling workouts.
  5. Sample Code and Feedback:

    • Check out the updated sample code provided by Apple to see examples of how to build and schedule custom swimming workouts.
    • Send feedback through the feedback assistant to share your experiences and suggestions.

For more detailed information, you can refer to the session Build custom swimming workouts with WorkoutKit.

Relevant Sessions

  1. Build custom swimming workouts with WorkoutKit
  2. What’s new in watchOS 11

These sessions will provide you with comprehensive guidance on building and customizing workout apps for Apple Watch.