Just steps in React iOS instructions.
Should build first project as expected
npm install -g react-native-cli &&
react-native init AwesomeProject &&
cd AwesomeProject &&
react-native run-ios
Then build in Xcode 10.2, and shows error: "'React/RCTBridgeModule.h' file not found"
Also tried another another solutions as removing node_models and "yarn"; also changing project build system to "Legacy Build System", but any of this worked.
Link to my repo: https://github.com/andremvb/TestReact
Help please :(.
React Native Environment Info:
System:
OS: macOS 10.14.4
CPU: (8) x64 Intel(R) Core(TM) i7-4850HQ CPU @ 2.30GHz
Memory: 265.90 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 11.13.0 - /usr/local/bin/node
Yarn: 1.15.2 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
IDEs:
Xcode: 10.2/10E125 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: 0.59.4 => 0.59.4
npmGlobalPackages:
react-native-cli: 2.0.1
+1
+1
+1
os - 10.14.3
react: "16.8.3"
xcode: 10.2.1
react-native: "0.59.4"
node: v10.15.3
I've been dealing with the same problem with any new projects I've tried testing, and an app that was previously working and my coworker can get to run. I noticed that my build differs from my coworkers with the same settings and code, not sure why. This is the specific error I'm seeing.
`CompileC /Users/PATH/project/node_modules/react-native/Libraries/Blob/build/RCTBlob.build/Debug-iphonesimulator/RCTBlob.build/Objects-normal/x86_64/RCTBlobManager.o /Users/PATH/project/node_modules/react-native/Libraries/Blob/RCTBlobManager.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target: RCTBlob)
...
In file included from /Users/PATH/node_modules/react-native/Libraries/Blob/RCTFileReaderModule.m:9:
/Users/PATH/node_modules/react-native/Libraries/Blob/RCTFileReaderModule.h:8:9: fatal error: 'React/RCTBridgeModule.h' file not found
^~~~~~~~~~~~~~~~~~~~~~~~~`
Looking at the log, RCTBridgeModule.h is copied successfully in the React build. The RCTBlobManager.o file is not in the /Blob/build/.. folder. Following other suggestions, parallelize build is unchecked, headers includes $(inherited). I've tried adding React as an explicit dependency and used legacy build, which didn't work, have deleted and reinstalled node_mods with clean cache.
Would also appreciate some help. Thanks!
+1
I think some problem when config in xcode. I did try reset and it working. In your terminal, run:
defaults delete com.apple.dt.Xcode
@anhdevit Your solution works. Thanks a lot!
Thanks @anhdevit for the workaround, I'll close as solved as it seems out of the realm of RN and more macosx/Xcode
This is still a problem for React-Native 0.55.1 for tvOS build targets.
I think some problem when config in xcode. I did try reset and it working. In your terminal, run:
defaults delete com.apple.dt.Xcode
@anhdevit Still getting the same error. Any solutions please.
Still a bug, despite attempting workaround.
Anyone found any solution?
Still broken :(
@ralfisalhon try clearing derived data cache rm -rf ~/Library/Developer/Xcode/DerivedData and restart xcode. maybe it can help you.
Hey @andersonqi thanks for the response, unfortunately still experiencing the same issue. Do you know of a way to use React inside a module without using Pods? I do not want to migrate my project to be a Pods project but it depends on React/RCTBridgeModule.h
The same problem. What's your workaround?
Has anyone found the Solution?
Experiencing this issue only in xcode 10.2
I think some problem when config in xcode. I did try reset and it working. In your terminal, run:
defaults delete com.apple.dt.Xcode
Can you tell me what does this command does?
Still a problem - anyone found the solution!?
+1
+1
+1
Same problem here.I tried changing on Edit Scheme and disabling Parallelize Build but not successfully.
if by any chance someone is experiencing this issue and is using iCloud, make sure your project is not syncing to iCloud. That is the root cause of all the problems I encountered.
+1 same issue
I solved it deleting my Pods files removing the DerivedData opening the terminal and running pod install again and after pod update.
This error is caused because the Library it's not sync with your project.
You need to see your package on Pods folder not on Library Folder.
Note: Every time you install a new package you need to be sure if your package are linked correctly with your Podfile.
+1 same issue
+1 same issue. Our project is at a standstill to no avail
+1
I solved it deleting my Pods files removing the DerivedData opening the terminal and running pod install again and after pod update.
This error is caused because the Library it's not sync with your project.
You need to see your package on Pods folder not on Library Folder.Note: Every time you install a new package you need to be sure if your package are linked correctly with your Podfile.
@troyam
I have followed your solution but did not worked out.
Library which I am using is not using Pod files and giving this error while I am linking the library in build phases. will you please help me out to resolve this error?
From researching this issue, there are quite a few issues which cause this error to happen. So trying many different ones will eventually lead to success.
Upgrade from 0.60 to 0.61 I had this issue. The solution was to delete all react-native linked 3rd party .xcodeproj files in Project Navigator that pointed to ../node_modules/. And then just add them again by right-clicking Navigator and using "Add files to"Project Name ""
I am at RN 0.59.9 only and getting this error.
Getting this same issue using React-Native 0.60.5 and XCode 10.3. I tried the solutions posted above without any luck, anybody have any luck with other methods?
From researching this issue, there are quite a few issues which cause this error to happen. So trying many different ones will eventually lead to success.
Upgrade from 0.60 to 0.61 I had this issue. The solution was to delete all react-native linked 3rd party .xcodeproj files in Project Navigator that pointed to ../node_modules/. And then just add them again by right-clicking Navigator and using "Add files to"Project Name ""
This was exactly my case. Thanks @alnorris !
Manually adding React.xcodeproj to your Libraries folder in XCode solved the problem
react-native-sensitive-info was complaining about this problem for me. I had updated to RN <0.6, and had it linked. Unlinking it resolved this for me, but then I ran into some other issues.
Any news about this? I'm stuck with the same problem... RN 0.61.5
Any news about this? I'm stuck with the same problem... RN 0.61.5
me too I'm stuck with the same problem!
same problem after trying to install the facebook sdk :(
Any news about this? I'm stuck with the same problem... RN 0.61.5
Can you try to use Pod?
Link Podfile for v0.61.5
https://github.com/facebook/react-native/blob/v0.61.5/template/ios/Podfile
any solution for react-native 0.59.1?
any solution for react-native 0.59.1?
Try this way:
- Open Scheme Manager and choose your library
- Uncheck Parallelize Build
- Delete React and Add it again
- Drag to top of list

still a problem
rn 0.62.2
xcode 11.4.1
Same problem for me with Xcode 11.3 and rn 0.59.9
Most helpful comment
I think some problem when config in xcode. I did try reset and it working. In your terminal, run:
defaults delete com.apple.dt.Xcode