A minimalistic SwiftUI iOS app for guided workout routines with timer-based and repetition-based exercises. Suitable for calisthenics, weightlifting, and interval workouts.
- Structured Workouts: JSON-defined workout routines with nested exercise groups. It supports supersets.
- Mixed Exercise Types: Support for both timed exercises and repetition-based exercises.
- Audio Feedback: Sound cues for exercise prepare/start/end transitions.
- Progress Tracking: Visual indicators for current exercise, sets, weight, time and upcoming exercise.
- Pause/Resume: Full control over workout progression.
- Flexible Rest Periods: Configurable rest between exercises and exercise groups.
- Flexible Prepare Time: Configurable preparation time for timed exercises.
The Training Tracker guides users through comprehensive workout routines with:
- Preparation Phase: configurable countdown before timed exercises to get ready.
- Exercise Execution: Clean timer interface showing current exercise, duration/reps/weight, and progress.
- Rest Management: Automatic rest periods between exercises with countdown timers. No interaction needed.
- Set Tracking: Visual indicators showing current set progress and upcoming exercises.
- Sound Feedback: Audio cues mark transitions between phases for hands-free operation.
- Xcode 15.2 or later
- iOS 17.2 or later
- Swift 5.0
- Clone the repository
- Open
Training Tracker.xcodeprojin Xcode - Select the "Training Tracker" scheme
- Build and run with
⌘+R
- Run all tests:
⌘+Uin Xcode - Run specific test: Select test method and use
⌘+U
Workouts are defined in JSON files located in the Resources/ directory:
workoutRoutine_real.json- Full workout routine (currently active)workoutRoutine.json- Basic workout templateworkoutRoutine_flo.json- Alternative routine
{
"name": "Workout Name",
"exercisesGroups": [
{
"name": "Exercise Group",
"restInBetween": 90,
"restAtTheEnd": 120,
"exercises": [
{
"name": "Timed Exercise",
"description": "Exercise description",
"prepTimes": [10],
"durations": [180],
"numberOfSets": 1
},
{
"name": "Rep Exercise",
"repetitions": [10, 12, 15],
"numberOfSets": 3
}
]
}
]
}- Timed Exercises: Use
durationsarray for exercise duration in seconds. - Repetition Exercises: Use
repetitionsarray for rep counts per set. - Preparation Time: Optional
prepTimesfor setup before timed exercises. - Rest Periods: Configure
restInBetweenexercises andrestAtTheEndof groups.
The app follows an MVC pattern with Observable models:
- Models:
@Observableclasses for state management (RoutineModel,AppLifecycleModel). - Controllers: Business logic coordinators (
RoutineController,TimerController). - Views: SwiftUI views that observe models and trigger actions.
TrainingLifecycleView: Root view managing app state transitions.RoutineController: Orchestrates workout progression.Step: Core data structure representing workout steps.SoundPlayer: Audio feedback system.
The project uses SwiftMock:
let mockController = Mock<RoutineCtrl>.create()
mockController.expect { $0.onStepCompletion() }
// ... exercise system under test
mockController.verify()- Follow existing code patterns and architecture
- Add tests for new functionality
- Update JSON schemas if modifying workout structure
- Ensure audio feedback works for new exercise types
This project is licensed under the MIT License - see the LICENSE.md file for details.