From e4c72011eb6600331bac0cc3f21c54303a2b140a Mon Sep 17 00:00:00 2001 From: Admin Date: Mon, 9 Mar 2026 18:27:29 +0500 Subject: [PATCH] fix: extract and use actual profile name from mobileprovision file --- .gitea/workflows/ios-release.yaml | 6 +++++- ios/LibNovel/fastlane/Fastfile | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/ios-release.yaml b/.gitea/workflows/ios-release.yaml index e79d656..060173d 100644 --- a/.gitea/workflows/ios-release.yaml +++ b/.gitea/workflows/ios-release.yaml @@ -76,8 +76,11 @@ jobs: PP_PATH=$RUNNER_TEMP/profile.mobileprovision echo "$PROFILE_BASE64" | base64 --decode > $PP_PATH UUID=$(security cms -D -i "$PP_PATH" | plutil -extract UUID raw -) + PROFILE_NAME=$(security cms -D -i "$PP_PATH" | plutil -extract Name raw -) mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles/$UUID.mobileprovision + echo "Installed profile: $PROFILE_NAME (UUID: $UUID)" + echo "PROFILE_NAME=$PROFILE_NAME" >> $GITHUB_ENV - name: Build and upload to TestFlight env: @@ -88,10 +91,11 @@ jobs: APPLE_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }} APPLE_KEY_CONTENT: ${{ secrets.ASC_PRIVATE_KEY }} BUILD_NUMBER: ${{ gitea.run_number }} - PROVISIONING_PROFILE_NAME: LibNovel Distribution working-directory: ios/LibNovel run: | eval "$(rbenv init -)" + echo "Using provisioning profile: $PROFILE_NAME" + export PROVISIONING_PROFILE_NAME="$PROFILE_NAME" bundle exec fastlane beta - name: Cleanup keychain diff --git a/ios/LibNovel/fastlane/Fastfile b/ios/LibNovel/fastlane/Fastfile index 1b97988..0d62c48 100644 --- a/ios/LibNovel/fastlane/Fastfile +++ b/ios/LibNovel/fastlane/Fastfile @@ -12,14 +12,13 @@ platform :ios do xcodeproj: "LibNovel.xcodeproj" ) - # Update code signing settings to use automatic signing with team + # Update code signing settings - let Xcode automatically select the profile update_code_signing_settings( use_automatic_signing: false, path: "LibNovel.xcodeproj", team_id: "GHZXC6FVMU", code_sign_identity: "Apple Distribution", - targets: ["LibNovel"], - profile_name: ENV["PROVISIONING_PROFILE_NAME"] || "LibNovel Distribution" + targets: ["LibNovel"] ) # Build the app @@ -28,6 +27,7 @@ platform :ios do export_method: "app-store", clean: true, configuration: "Release", + xcargs: "-allowProvisioningUpdates", export_options: { method: "app-store", signingStyle: "manual",