Can't build project after upgrading to 0.40.
PS1: Upgraded from 0.39 using react-native-git-upgrade.
PS2: I compared the diff with this 0.39..0.40 diff and they are identical, so the upgrade went fine.
Same happens with new installation with all the RN packages imported with react-native link
This was probably introduced by the breaking change on 0.40 that requires a "React/" namespace on header paths. Apparently all native modules will have to upgrade themselves to support RN >= 0.40, so... we better send them PRs!
I was just starting a project from scratch.
It would run after running react-native init, but as soon as I followed these instructions to include native code for the react-native-webrtc module, I started getting this error.
Hopefully that helps ...
Yeah it seems that react-native-webrct hasn't upgraded for v0.40 yet. Sorry about the inconvenience
See here: https://github.com/oney/react-native-webrtc/search?utf8=%E2%9C%93&q=import+%22
A bunch of these need to be converted. If it says #import "RCTConvert.h", it needs to change to #import <React/RCTConvert.h>
same problem to me!
Problem with react-native-fbsdk and Facebook iOS SDK, its the same :(
I tried what @ericvicenti said above and changed all #import "RCTConvert.h" to #import <React/RCTConvert.h>, but I am still getting the error:
/node_modules/react-native/React/Base/RCTBridge.h:65:1: Duplicate interface definition for class 'RCTBridge'
This is for https://github.com/wix/react-native-navigation.
@SMJ93 remove all the React Native related Header Search Paths in 3rd party libraries
Finally!! I managed to fix the error by Find and Replace in Project and change all #import "RCTBridge.h" to #import <React/RCTBridge.h> in addition to @ericvicenti's and @nihgwu answer's above. Thanks guys.
I got it working by upgrading to the most recent github version of react-native-fbsdk. The official release should be out in the next few days.
A lot of the 3rd party libraries have yet to release stable versions with RN 0.40 fix, and it can get frustrating very quickly. We confronted with this problem as well, on several packages. I described our approach and am leaving the link here so that others can use it to continue working asap.
For me fix was:
react-native upgrade
hit y for all iOS files
@nihgwu 'remove all the React Native related Header Search Paths in 3rd party libraries' how to do that?
@nihgwu @brunolemos the same problem happened for react native 0.43.4. It should be solved with correct process neither to change all #import "RCTBridge.h" to #import
Most helpful comment
Problem with react-native-fbsdk and Facebook iOS SDK, its the same :(