Skip to content

VoiceStudio is the open-source, fully-local ElevenLabs alternative — voice cloning, voice design, video dubbing, dictation, transcription & audiobook creation in 646 languages.

fix(ci): check the team, not Apple Distribution, on the iOS archive

velixio0655e94a2e24
diff --git a/.github/workflows/ios-testflight.yml b/.github/workflows/ios-testflight.yml
index 4eeee7839..6e5b3529f 100644
--- a/.github/workflows/ios-testflight.yml
+++ b/.github/workflows/ios-testflight.yml
@@ -71,11 +71,16 @@ jobs:
DEVELOPMENT_TEAM="$TEAM_ID" CODE_SIGN_STYLE=Automatic \
archive
+ # Automatic signing archives with the team's development identity; the
+ # export below re-signs for App Store distribution and App Store Connect
+ # rejects anything else. The archive must still be validly signed by this team.
- name: Verify archive signature and version
+ env:
+ TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
run: |
APP="$RUNNER_TEMP/VoiceStudio.xcarchive/Products/Applications/VoiceStudio.app"
codesign --verify --deep --strict "$APP"
- codesign -dvv "$APP" 2>&1 | grep -q '^Authority=Apple Distribution:'
+ codesign -dvv "$APP" 2>&1 | grep -qx "TeamIdentifier=$TEAM_ID"
test "$(/usr/libexec/PlistBuddy -c 'Print CFBundleVersion' "$APP/Info.plist")" = "$VOICESTUDIO_IOS_BUILD_NUMBER"
- name: Upload to TestFlight
diff --git a/docs/mobile.md b/docs/mobile.md
index 56909753d..4f4edeba0 100644
--- a/docs/mobile.md
+++ b/docs/mobile.md
@@ -84,10 +84,13 @@ submits the app for App Store review. One-time setup in the Apple Developer team
1. Register the App ID `sh.voicestudio.mobile` (Certificates, Identifiers &
Profiles → Identifiers) and create the app in App Store Connect with it.
-2. Create an App Store Connect API key with the **Admin** role (Users and
+2. Register at least one iPhone under Devices (its UDID is in Finder when it
+ is connected). Automatic signing archives with a development profile first,
+ and Apple issues none for a team without devices.
+3. Create an App Store Connect API key with the **Admin** role (Users and
Access → Integrations). Admin lets CI create the cloud-managed Apple
Distribution certificate and App Store profile, so no `.p12` is stored.
-3. Create the `app-store-connect` environment (Settings → Environments), limit
+4. Create the `app-store-connect` environment (Settings → Environments), limit
it to the `main` branch, and add `APP_STORE_CONNECT_KEY_ID`,
`APP_STORE_CONNECT_ISSUER_ID` and `APP_STORE_CONNECT_API_KEY` (the full
`.p8` text). `APPLE_TEAM_ID` is shared with macOS notarization.
diff --git a/tests/test_ios_testflight.py b/tests/test_ios_testflight.py
index 3f919df94..48cb19575 100644
--- a/tests/test_ios_testflight.py
+++ b/tests/test_ios_testflight.py
@@ -63,3 +63,13 @@ def test_workflow_signs_verifies_and_cleans_up_the_key():
assert "testFlightInternalTestingOnly bool true" in source
# Secrets reach only the steps that need them, never the whole job.
assert "secrets." not in yaml.dump(load_workflow()["jobs"]["testflight"].get("env", {}))
+
+
+def test_archive_check_matches_automatic_signing():
+ # The archive carries the development identity until export re-signs it, so
+ # requiring Apple Distribution here failed every run; check the team instead.
+ steps = load_workflow()["jobs"]["testflight"]["steps"]
+ verify = next(step for step in steps if step.get("name") == "Verify archive signature and version")
+ assert "Authority=Apple Distribution" not in verify["run"]
+ assert 'TeamIdentifier=$TEAM_ID' in verify["run"]
+ assert verify["env"]["TEAM_ID"] == "${{ secrets.APPLE_TEAM_ID }}"