How do I build a workout app on iPhone?
Asked on 2024-07-30
1 search
To build a workout app on iPhone, particularly focusing on custom swimming workouts, you can leverage the capabilities of WorkoutKit. Here are the steps and features you can use:
-
Create Different Types of Workouts: WorkoutKit allows you to create various types of workouts such as goal-based workouts, pacer workouts, triathlon workouts, and custom workouts. Custom workouts can include structured steps with custom goals and alerts.
-
Structure of Custom Workouts: Custom workouts are composed of steps that conform to warm-up, work, recovery, or cool-down types. Work and recovery steps can be grouped into repeatable interval blocks.
-
Custom Pool Swimming Workouts: For swimming workouts, you can specify the activity as swimming, add a display name, and pool all steps together. You can use the workout scheduler API to schedule the workout.
-
New Features in watchOS 11:
- Distance with Time Goal: This new goal type allows a workout step to have both a distance goal and a time goal.
- Custom Step Names: You can customize the names of your work, recovery, warm-up, and cool-down steps using the new display name property.
-
Example of Building a Custom Swimming Workout:
- Create a distance with time goal, e.g., 225 meters in 1 minute.
- Customize the step name to indicate the swim stroke.
- Add the step to an interval block with repeats.
- Create warm-up and cool-down steps.
- Use the workout scheduler API to schedule the workout.
For more detailed guidance, you can refer to the session Build custom swimming workouts with WorkoutKit.
Relevant Sessions
These sessions provide comprehensive information on how to utilize WorkoutKit for building custom workouts and the new features available in watchOS 11.

Bring your app’s core features to users with App Intents
Learn the principles of the App Intents framework, like intents, entities, and queries, and how you can harness them to expose your app’s most important functionality right where people need it most. Find out how to build deep integration between your app and the many system features built on top of App Intents, including Siri, controls and widgets, Apple Pencil, Shortcuts, the Action button, and more. Get tips on how to build your App Intents integrations efficiently to create the best experiences in every surface while still sharing code and core functionality.

What’s new in watchOS 11
Explore new opportunities on Apple Watch, including bringing Double Tap support to your watchOS app, making your Smart Stack widgets even more relevant and interactive, and displaying your iOS Live Activities in the Smart Stack.

Build custom swimming workouts with WorkoutKit
Check out the latest in creating, customizing, and scheduling workouts using WorkoutKit. Sprint through the latest in pace and power alerts and expanded support for distance goals. And keep the momentum going with the benefits of custom step names.
