react-native: [iOS - RN 0.61.1 migration] React/RCTBridgeModule.h file not found

Reopening bug that is wrongly closed https://github.com/facebook/react-native/issues/26615

React Native version: 0.61

Steps To Reproduce

  1. Upgrade to 0.61 with upgrade-helper-tool
  2. If your project has a 3rd party module that are Linked manually, building it results in: React/RCTBridgeModule.h file not found

Describe what you expected to happen: To compile correctly

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 55
  • Comments: 36 (3 by maintainers)

Most upvoted comments

@zhenghui0705 well if you have the react missing thing, here’s what I did.

  1. Check that I have React in my pods (pod ‘React’, :path => ‘…/node_modules/react-native/’). If not, add it.
  2. Uninstall reinstall pods (pod deintegrate && pod clean && pod install in the ios folder, I believe the pod deintegrate command needs to be downloaded and isn’t available by default)
  3. Go to scheme -> edit scheme -> build, delete the React(missing) using the ‘minus’ button. Click on ‘add’ or a ‘plus’ button. Find React (should be in the Pods category) and add it. Finally, make sure all boxes are ticked for React, and place it at the top of the list.

Here you go, I hope this helps. If however you do not have the React(missing), I have no idea how to solve this since i’ve never had this problem 😕

the same

many libraries migrated to pods

[!] CocoaPods could not find compatible versions for pod "ReactCommon/callinvoker":

I had the same issue. I just did following to fix:

  1. Remove the package-name.xcodeproj of package from Libraries in Xcode
  2. Remove package Frameworks if any, in Xcode.
  3. Remove package from Build Phases > Link Binary with Libraries
  4. Remove search headers of that package in: Build Settings > Header Search Paths (do that for all project Targets, even -tv, -tests)
  5. Make sure the package implements correctly package-name.podspec file in root (check any community based package for reference)
  6. run cd ios && pod install
  7. Run: Clean ⇧+⌘+K & Clean Build Folder ⎇+⇧+⌘+K

This helped me solve the missing xxx.h files from React. I also did remove React.xcodeproj from scheme build targets, since it was remove in latest release.

Also being affected by this and can no longer link + build my custom native module that worked before i upgraded to 0.61.2

Hi @alnorris ! When you go to scheme -> edit scheme -> build. Do you have see React (missing) ? If so, i might have a solution because this happened to me. If not, need more information 😕

I managed to fix it by adding $(SRCROOT)/../../../../ios/Pods/Headers/Public/** in Header Search Paths (recursive) to each 3rd party target. React it’s only accessible by pods now.

@grabbou, any library without a podspec. Ex: https://github.com/smalltownheroes/react-native-adobe-analytics. If manual linking is in fact deprecated, I would advise we need to include this as a breaking change in the change log, and remove this from the documentation: https://facebook.github.io/react-native/docs/linking-libraries-ios#manual-linking

Just install everything from Pods, cd ios pod init install all the required libraries using pod, remove all the .xcodeproject from libraries, remove all the libraries from linked frameworks and libraries except libPods-ProjectName.a Go to your Build Setting, Header Search Paths, remove all the paths and add “$(SRCROOT)/Pods/Headers/”

Now open .xworkspace and your code will work like a charm

https://medium.com/@arjunsinghrajput/something-wrong-with-react-native-b398d5a66278

Reopening bug that is wrongly closed #26615

React Native version: 0.61

Steps To Reproduce

  1. Upgrade to 0.61 with upgrade-helper-tool
  2. If your project has a 3rd party module that are Linked manually, building it results in: React/RCTBridgeModule.h file not found

I have same issue

The solution, for me, was deleting the entire ios folder, generating a new project with react-native-init, and moving the ios folder from the newer project to the official one. wrong? yes but it worked. maybe this happens when you upgrade your react native version

@raphaelpinel pod cleanand pod deintegrate are downloadable plugins: sudo gem install cocoapods-deintegrate cocoapods-clean

I spent 2 days on getting this all in one workaround: https://github.com/facebook/react-native/issues/26665#issuecomment-571082076

I managed to fix it by adding $(SRCROOT)/../../../../ios/Pods/Headers/Public/** in Header Search Paths (recursive) to each 3rd party target. React it’s only accessible by pods now.

faced same issue.

pod deintegrate && pod cache clean --all && pod install added Header Search Path used legacy build.

Skipped this error.


try also react-native unlink ${LIB_NAME} then pod install in ios directory.
may also caused by already manually linked conflicts with auto linking.

any solution? I also find this error in upgrading to RN 0.61.5

@ma96o thks!