Stop Xcode 14 from signing pods (React Native solution)

From version 14 Xcode has now started signing external pods, which causes problems in React Native versions below 0.70.3:

[...]/ios/Pods/Pods.xcodeproj error project: Signing for "React-Core-AccessibilityResources" requires a development team. Select a development team in the Signing & Capabilities editor.

To solve this you need to upgrade Reach Native to at least 0.70.3, which can be a somewhat daunting task. In the meantime you can set xcconfig rules in your Podfile post install block to stop Xcode from signing these pods (React-Core):

1installer.target_installation_results.pod_target_installation_results.each do |pod_name, target_installation_result| 2 if pod_name.to_s == 'React-Core' 3 target_installation_result.resource_bundle_targets.each do |resource_bundle_target| 4 resource_bundle_target.build_configurations.each do |config| 5 config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO' 6 config.build_settings['CODE_SIGN_STYLE'] = 'Manual' 7 end 8 end 9 end 10 end

Some people have reported being denied in app review after doing this, while others report being approved without issues.