fix(mobile): use fastlane setup_ci for keychain management (official approach)

This commit is contained in:
Alex
2026-01-06 09:01:24 -06:00
parent 478d9f1a15
commit 2ab379592f
2 changed files with 5 additions and 44 deletions
+5 -10
View File
@@ -48,21 +48,16 @@ platform :ios do
# Helper method to sync certificates and profiles using match
def sync_code_signing(app_identifiers:, readonly: true)
keychain = ENV["KEYCHAIN_NAME"] || "login.keychain"
keychain_password = ENV["KEYCHAIN_PASSWORD"] || ""
# Use fastlane's setup_ci which creates a temporary keychain and handles everything
if ENV["CI"]
setup_ci
end
match(
type: "appstore",
app_identifier: app_identifiers,
readonly: readonly,
keychain_name: keychain,
keychain_password: keychain_password
readonly: readonly
)
# Set key partition list after match imports certificates (required for CI)
if ENV["CI"] && !keychain_password.empty?
sh("security set-key-partition-list -S apple-tool:,apple: -s -k \"#{keychain_password}\" #{keychain} 2>/dev/null || true")
end
end
# Helper method to get version from pubspec.yaml