Skip to content

Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.

iOS UI tests: give the test target its product name

Duarte Santosb3680673511a
diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml
index ae671bcf8..62e7d493b 100644
--- a/.github/workflows/ios.yml
+++ b/.github/workflows/ios.yml
@@ -108,6 +108,7 @@ jobs:
const all = Object.entries(d).filter(([k]) => k.includes("iOS")).flatMap(([, v]) => v)
process.stdout.write(all.filter(x => /^iPhone/.test(x.name)).pop().udid)')
xcrun simctl boot "$UDID" && xcrun simctl bootstatus "$UDID" -b
+ mkdir -p build
set -o pipefail
xcodebuild test -workspace App.xcworkspace -scheme AppUITests -destination "id=$UDID" \
-resultBundlePath build/ui.xcresult CODE_SIGNING_ALLOWED=NO \
diff --git a/frontend/ios/ci/add-ui-tests.rb b/frontend/ios/ci/add-ui-tests.rb
index 7d4f238d5..6aed86d7f 100644
--- a/frontend/ios/ci/add-ui-tests.rb
+++ b/frontend/ios/ci/add-ui-tests.rb
@@ -13,6 +13,7 @@ tests.add_file_references([group.new_file('OpenGymUITests.swift')])
tests.build_configurations.each do |c|
s = c.build_settings
s['TEST_TARGET_NAME'] = 'App'
+ s['PRODUCT_NAME'] = '$(TARGET_NAME)'
s['PRODUCT_BUNDLE_IDENTIFIER'] = 'ch.duartesantos.opengym.uitests'
s['SWIFT_VERSION'] = '5.0'
s['GENERATE_INFOPLIST_FILE'] = 'YES'