From cfa054a593757259bc5076b0405856590323e09a Mon Sep 17 00:00:00 2001 From: Daniel Arantes Loverde Date: Fri, 31 Jul 2026 10:20:33 -0300 Subject: [PATCH] [macos-runner] Scope manual signing to the app target only Blanket xcargs (CODE_SIGN_STYLE=Manual etc.) applied to every target in the build, including the SPM package's own generated targets (PediFoods, pedi-foods_PediFoods) which explicitly reject provisioning profiles and need to stay Automatic. Use update_code_signing_settings scoped to just "PediFoods App" instead, guarded behind DEVELOPMENT_TEAM being set so Bitrise's existing automatic-signing path is untouched. --- Darwin/fastlane/Fastfile | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Darwin/fastlane/Fastfile b/Darwin/fastlane/Fastfile index 9da47f1..656ae00 100644 --- a/Darwin/fastlane/Fastfile +++ b/Darwin/fastlane/Fastfile @@ -7,12 +7,28 @@ default_platform(:ios) lane :assemble do |options| # only build the iOS side of the app ENV["SKIP_ZERO"] = "true" + + # Scope manual signing to just the app target - the SPM package's own + # generated targets (PediFoods, pedi-foods_PediFoods) explicitly don't + # support provisioning profiles and must stay on Automatic, so a blanket + # xcargs override breaks them. + if ENV["DEVELOPMENT_TEAM"] + update_code_signing_settings( + use_automatic_signing: false, + path: "PediFoods.xcodeproj", + code_sign_identity: "Apple Distribution", + profile_name: "com.br.pedifoods.app AppStore", + team_id: ENV["DEVELOPMENT_TEAM"], + targets: ["PediFoods App"] + ) + end + build_app( scheme: "PediFoods App", sdk: "iphoneos", export_method: ENV["BITRISE_DISTRIBUTION_METHOD"] || "app-store", xcconfig: "fastlane/AppStore.xcconfig", - xcargs: "-skipPackagePluginValidation -skipMacroValidation CODE_SIGN_STYLE=Manual CODE_SIGN_IDENTITY=\"Apple Distribution\" PROVISIONING_PROFILE_SPECIFIER=\"com.br.pedifoods.app AppStore\" DEVELOPMENT_TEAM=#{ENV['DEVELOPMENT_TEAM']}", + xcargs: "-skipPackagePluginValidation -skipMacroValidation", derived_data_path: "../.build/Darwin/DerivedData", output_directory: "../.build/fastlane/Darwin", skip_archive: ENV["FASTLANE_SKIP_ARCHIVE"] == "YES",