ios fixes

This commit is contained in:
Forrest 2026-07-30 10:03:07 -04:00
parent 8fbfcc113c
commit 16b227cdaa

View file

@ -112,10 +112,23 @@ workflows:
- *analyze
- *unit_tests
- name: Fetch signing files
# Pulls (or creates) the distribution cert + provisioning profile for
# the bundle id via the App Store Connect integration, and writes the
# export_options.plist the build step reads.
script: xcode-project use-profiles
# Codemagic's automatic signing (the ios_signing block) only *fetches*
# existing certs/profiles — it never creates them. On a fresh account
# with no distribution cert or App Store profile yet, that fetch is
# empty and `use-profiles` fails with "No matching profiles found".
# So we explicitly create-on-miss here: fetch-signing-files --create
# mints the Apple Distribution cert + App Store profile via the ASC API
# key (the App ID must already be registered), add-certificates loads
# the new cert into the build keychain (already initialized by the
# ios_signing block), and use-profiles writes export_options.plist.
# After the first successful run these resources exist and are simply
# reused on subsequent builds.
script: |
app-store-connect fetch-signing-files "com.troglodyte.timbre" \
--type IOS_APP_STORE \
--create
keychain add-certificates
xcode-project use-profiles
- name: Build signed IPA
script: |
BUILD_NUMBER=$(app-store-connect get-latest-testflight-build-number "$APP_STORE_APPLE_ID" 2>/dev/null || echo 0)