workout-app

Build & Run

Prerequisites

First-time setup

cd /Users/gibou/code/github/workout-app
xcodegen generate
open WorkoutApp.xcodeproj

Then in Xcode:

  1. Pick an iPhone simulator (any iOS 17+).
  2. Product → Run (⌘R).

The app launches into the empty journal. Type “a banana” + Done — the mock resolver will fill in calories.

Whenever you add or rename a file

xcodegen generate

Then in Xcode: File → “Revert changes” if it complains about the project file having changed externally, or just close + reopen.

Building from the CLI

xcodebuild \
  -project WorkoutApp.xcodeproj \
  -scheme WorkoutApp \
  -destination 'platform=iOS Simulator,name=iPhone 15' \
  build

Substitute the simulator name with one from xcrun simctl list devices available | grep iPhone.

Running tests

xcodebuild \
  -project WorkoutApp.xcodeproj \
  -scheme WorkoutApp \
  -destination 'platform=iOS Simulator,name=iPhone 15' \
  test

Wiring a real backend

See BACKEND_SETUP.md. TL;DR:

  1. Copy WorkoutApp/Resources/Secrets.example.xcconfigSecrets.xcconfig.
  2. Fill in BACKEND_URL and BACKEND_ANON_KEY.
  3. xcodegen generate.

Common issues