From 7445561e5cc1b3d3dc3fe5fe06f42cc7a77e9440 Mon Sep 17 00:00:00 2001 From: Daniel Arantes Loverde Date: Fri, 31 Jul 2026 10:54:04 -0300 Subject: [PATCH 1/2] [macos-runner] Revert update_code_signing_settings - unusable on this project format The xcodeproj gem can't parse PediFoods.xcodeproj's .pbxproj (newer Xcode format than any released gem version supports), so the runtime override always fails with a misleading "very old project file" error. Signing config for the app target needs to live in the checked-in project settings instead (set once via Xcode's GUI), since no command-line override can be scoped to a single target without also breaking the SPM package's own ephemeral targets. --- Darwin/fastlane/Fastfile | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/Darwin/fastlane/Fastfile b/Darwin/fastlane/Fastfile index 656ae00..17b1135 100644 --- a/Darwin/fastlane/Fastfile +++ b/Darwin/fastlane/Fastfile @@ -8,21 +8,15 @@ 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 - + # Manual signing (team/identity/profile) for the "PediFoods App" target is + # baked directly into PediFoods.xcodeproj's own project settings - not + # overridden here. A command-line xcargs/update_code_signing_settings + # override applies to the entire build graph, including the SPM package's + # own ephemeral targets (PediFoods, pedi-foods_PediFoods) which explicitly + # reject provisioning profiles and must stay Automatic; there's no way to + # scope a global override to just one target, and update_code_signing_settings + # itself can't parse this project's newer .pbxproj format anyway (gem + # limitation, not fixable by updating the gem). build_app( scheme: "PediFoods App", sdk: "iphoneos", From 57a4ad30862f030826a6c451813c6cb589911081 Mon Sep 17 00:00:00 2001 From: Daniel Arantes Loverde Date: Fri, 31 Jul 2026 11:12:59 -0300 Subject: [PATCH 2/2] [macos-runner] Set manual signing on the app target's Release configuration Baked directly into the project instead of overriding at build time - no tool can programmatically edit this project's .pbxproj (xcodeproj gem can't parse its format), and a command-line xcargs override applies to the whole build graph, breaking the SPM package's own targets which must stay on Automatic. Debug config left untouched so local Xcode development still uses automatic signing. --- Darwin/PediFoods.xcodeproj/project.pbxproj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Darwin/PediFoods.xcodeproj/project.pbxproj b/Darwin/PediFoods.xcodeproj/project.pbxproj index 7b8fcbe..9f94c21 100644 --- a/Darwin/PediFoods.xcodeproj/project.pbxproj +++ b/Darwin/PediFoods.xcodeproj/project.pbxproj @@ -195,6 +195,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 496EB72F2A6AE4DE00C1253B /* PediFoods.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = "Apple Distribution"; + CODE_SIGN_STYLE = Manual; DEVELOPMENT_TEAM = K4E5BZMM4V; ENABLE_PREVIEWS = YES; INFOPLIST_KEY_CFBundleDisplayName = "Pedi Foods"; @@ -202,6 +204,7 @@ INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; + PROVISIONING_PROFILE_SPECIFIER = "com.br.pedifoods.app AppStore"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; TARGETED_DEVICE_FAMILY = 1;