fix(ios): broaden resource-bundle signing fix — disable code-signing on all Pods targets

First attempt targeted only `target_installation_results.resource_bundle_targets` —
too narrow. With privacyManifestAggregationEnabled the Pods project has additional
bundle targets (aggregated privacy manifests) that also need code-signing disabled.
Brute-force fix: set CODE_SIGNING_ALLOWED/REQUIRED = NO and clear
EXPANDED_CODE_SIGN_IDENTITY on every target in installer.pods_project — pod
targets don't need signing, only the main app does. Added a Pod::UI.puts so we
can see the fix run in the EAS build log.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
chahinebrini 2026-05-11 23:48:29 +02:00
parent ac956b8311
commit 572766ab88

View File

@ -26,15 +26,18 @@ const MARKER = '# REBREAK_RESOURCE_BUNDLE_SIGNING_FIX';
const FIX = `
${MARKER}
# Xcode 14+ signiert Resource-Bundles per default -> braucht ein Dev-Team.
# Mit static frameworks erzeugen Pods Resource-Bundles -> Code-Signing fuer
# die abschalten (brauchen's nicht).
installer.target_installation_results.pod_target_installation_results.each do |pod_name, target_installation_result|
target_installation_result.resource_bundle_targets.each do |resource_bundle_target|
resource_bundle_target.build_configurations.each do |config|
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
end
# Mit static frameworks (+ privacyManifestAggregationEnabled) erzeugen Pods
# mehrere Bundle-Targets (Resource-Bundles, aggregierte Privacy-Manifests).
# Brute-Force: Code-Signing auf JEDEM Target im Pods-Projekt abschalten
# Pod-Targets brauchen keine Signatur, nur die Main-App.
installer.pods_project.targets.each do |t|
t.build_configurations.each do |config|
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
config.build_settings['CODE_SIGNING_REQUIRED'] = 'NO'
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ''
end
end
Pod::UI.puts " -> Disabled code signing on \#{installer.pods_project.targets.count} pod targets".green
${MARKER}
`;