Apple Fitness workout fixer + Strava uploader
1#!/bin/bash
2set -e
3
4SCHEME="WorkoutEditor"
5DEVICE="iPhone 17 Pro"
6BUNDLE_ID="com.metafluff.overrun"
7
8xcodebuild -scheme "$SCHEME" -destination "platform=iOS Simulator,name=$DEVICE" build 2>&1 | tail -5
9
10APP_PATH=$(find ~/Library/Developer/Xcode/DerivedData/WorkoutEditor-*/Build/Products/Debug-iphonesimulator -name "WorkoutEditor.app" -maxdepth 1 | head -1)
11
12xcrun simctl install "$DEVICE" "$APP_PATH"
13xcrun simctl terminate "$DEVICE" "$BUNDLE_ID" 2>/dev/null || true
14xcrun simctl launch "$DEVICE" "$BUNDLE_ID"