Building an AI workout coach in SwiftUI: one-tap logging during the set, GPT-4o analysis after
Most people who track their training in a notes app lose the one thing that matters: set-by-set context. The note does not remember what you lifted last week, and generic gym trackers bury the screen in charts without ever telling you what to do next. The brief for Body Forge was a coach in your pocket: clean tracking during the set, real analysis after it, and programmes that adapt as you…
During a workout, the Body Forge app presents minimal information to avoid overwhelming the user. It displays the last week's sets for the current exercise, a rest timer, weight, and reps, along with a single tap to log the set. Everything else is deferred until the session concludes. After completing the workout, the app compiles a concise summary and sends it to GPT-4o, which analyzes the data and provides personalized feedback for the next session.
To process the data efficiently, the app creates a structured summary containing exercise details, top sets from the last three weeks, volume change compared to the previous session, and average heart rate from HealthKit. This structured summary enables the AI model to generate a focused analysis in just 10 seconds, offering actionable recommendations such as adjusting weights or implementing a deload week.
Body Forge is developed using SwiftUI for iOS 17 and later, Core Data for local storage with CloudKit sync, and HealthKit for heart rate tracking during the workout. The app also features a custom program library with more than 200 exercises in multiple languages, including Russian. The landing page for Body Forge is a bilingual website that drives users directly to the App Store, emphasizing the app's unique value proposition through a single screen with a clear call-to-action.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.