Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate interface definition for class 'RCTBridge' #11725

Closed
brunolemos opened this issue Jan 4, 2017 · 14 comments
Closed

Duplicate interface definition for class 'RCTBridge' #11725

brunolemos opened this issue Jan 4, 2017 · 14 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@brunolemos
Copy link
Contributor

brunolemos commented Jan 4, 2017

Description

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.

Additional Information

  • React Native version: 0.40
  • Platform: iOS
  • Operating System: macOS 10.12.13

Screenshot

screenshot

@DesignMonkey
Copy link

Same happens with new installation with all the RN packages imported with react-native link

@brunolemos
Copy link
Contributor Author

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!

@justinmoon
Copy link

justinmoon commented Jan 5, 2017

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

@ericvicenti
Copy link
Contributor

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>

@xuechinahb
Copy link

same problem to me!

@Amurmurmur
Copy link

Amurmurmur commented Jan 6, 2017

Problem with react-native-fbsdk and Facebook iOS SDK, its the same :(

@SMJ93
Copy link

SMJ93 commented Jan 8, 2017

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.

@nihgwu
Copy link
Contributor

nihgwu commented Jan 8, 2017

@SMJ93 remove all the React Native related Header Search Paths in 3rd party libraries

@SMJ93
Copy link

SMJ93 commented Jan 8, 2017

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.

@christiangenco
Copy link

christiangenco commented Jan 10, 2017

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.

@georgiana-gligor
Copy link

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.

@franj0
Copy link

franj0 commented Apr 6, 2017

For me fix was:
react-native upgrade

hit y for all iOS files

@r01010010
Copy link

@nihgwu 'remove all the React Native related Header Search Paths in 3rd party libraries' how to do that?

@zhuozp
Copy link

zhuozp commented Sep 7, 2017

@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 <React/RCTBridge.h>. This solution is pretty bad。So. hope for all your Answer. THX.

@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests