Fixing error ‘requires setting the development team for each resource bundle target’ when generating dev build for iOS in React Native.

Tiempo de lectura: < 1 minuto

Reading time: < 1 minute

When generating a development build for iOS in React Native, you may encounter the following error:

Build failed: Starting from Xcode 14, resource bundles are signed by default, which requires setting the development team for each resource bundle target.
To resolve this issue, downgrade to an older Xcode version using the "image" field in eas.json, or turn off signing resource bundles in your Podfile: https://expo.fyi/r/disable-bundle-resource-signing

To resolve this issue, follow these steps:

  1. Navigate to the ios folder and open the Podfile
  2. Locate the line:
  post_install do installer
    react_native_post_install(installer)
    __apply_Xcode_12_5_M1_post_install_workaround(installer)

Add the following code snippet just below it:

    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
    end
  end

This code snippet indicates that code signing is not required.

The Podfile should now look like this:

post_install do installer
    react_native_post_install(installer)
    __apply_Xcode_12_5_M1_post_install_workaround(installer)

    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
    end
  end
  end

Next, run the following commands:

cd ios
pod deintegrate
pod install
pod update
cd ..
eas build --profile development --platform ios

Now the build should generate without any issues.

Leave a Comment