skip to Main Content

I am trying to build my project for iOS

  • react-native: 0.68.2
  • react: 17.0.2

But I get this error on iOS: 'react/bridging/Bridging.h' file not found in Pods/Development Pods/React-Codegen/FBReactNativeSpec.JSI

My minimum iOS deployment target is 12.4

2

Answers


  1. I encountered the exact same issue, and it turned out that the contents of the ios/build/generated folder were in an inconsistent state.

    By removing the contents of the ios/build folder and the Pods folder, followed by running pod install, I managed to fix the error.

    Hope this helps!

    Login or Signup to reply.
  2. Your Podfile should look like this:

      config = use_native_modules!
      flags = get_default_flags()
      use_frameworks!
      use_react_native!(
                    :path => config[:reactNativePath],
    
                    :hermes_enabled => flags[:hermes_enabled],
                    :fabric_enabled => flags[:fabric_enabled],
                    :app_path => "#{Pod::Config.instance.installation_root}/.."
                  )
    post_install do |installer|
      # https://github.com/facebook/react- 
      native/blob/main/scripts/react_native_pods.rb#L197-L202
       react_native_post_install(
         installer,
         :mac_catalyst_enabled => false
       )
       __apply_Xcode_12_5_M1_post_install_workaround(installer)
    end
    

    And than rm -rf Pods , rm -rf Podfile.lock, rm -rf build, pod cache clean --all and finally pod install

    After all of them it worked for me. I hope it works for you.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search