ci(ios): run xcode-project use-profiles after pod install, not before
The archive failed with 'App requires a provisioning profile' because use-profiles ran inside the signing step before pod install created the workspace, so the profile never bound to the App target. Move it to just before build-ipa, matching Codemagic's Capacitor recipe. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+8
-2
@@ -51,12 +51,14 @@ workflows:
|
||||
|
||||
- name: Set up code signing
|
||||
script: |
|
||||
# Automatic signing via the App Store Connect API key configured in the integration above.
|
||||
# Create the distribution certificate + provisioning profile from the ASC API key and add the
|
||||
# cert to the keychain. NOTE: `xcode-project use-profiles` is intentionally NOT here — it must
|
||||
# run AFTER `pod install` generates the workspace, otherwise it fails to wire the profile into
|
||||
# the App target and the archive dies with "App requires a provisioning profile".
|
||||
keychain initialize
|
||||
app-store-connect fetch-signing-files "$BUNDLE_ID" \
|
||||
--type IOS_APP_STORE --create
|
||||
keychain add-certificates
|
||||
xcode-project use-profiles
|
||||
|
||||
- name: Install CocoaPods
|
||||
script: |
|
||||
@@ -65,6 +67,10 @@ workflows:
|
||||
|
||||
- name: Build the signed IPA
|
||||
script: |
|
||||
# Apply the fetched provisioning profile(s) to the Xcode project NOW that the workspace exists,
|
||||
# then archive. use-profiles scans for **/*.xcodeproj under the repo root and sets manual
|
||||
# signing (team + profile specifier) on the matching App target.
|
||||
xcode-project use-profiles
|
||||
xcode-project build-ipa \
|
||||
--workspace "$XCODE_WORKSPACE" \
|
||||
--scheme "$XCODE_SCHEME"
|
||||
|
||||
Reference in New Issue
Block a user