React-native-wechat: 'RCTBridgeModule.h' file not found

Created on 18 Feb 2016  ·  24Comments  ·  Source: yorkie/react-native-wechat

Most helpful comment

If you are using the most recent version of react native (0.40 at time of post) - the proper import syntax has changed for your Objective C file:
#import
Replace with this. Same syntax will apply for importing RCTUtils or any other react library.

All 24 comments

32

@yorkie

+1

What's the screenshot which you get and the search path, this works at my machine~

/Users/pan/GitHub/reading/node_modules/react-native-wechat/ios/RCTWeChat.h:10:9: 'RCTBridgeModule.h' file not found build failed
@yorkie

cd Example && npm install

me too, how to deal with this problem

$(SRCROOT)/../node_modules/react-native-wechat/ios

@stevenxiale
change RCTWebChat.xcodeprojBuild SettingsSearch PathsHeader Search Paths to
$(SRCROOT)/../../react-native/React and
$(SRCROOT)/../../react-native/Libraries

@Richard-Cao thanks it is work

This failed for me :(
screen shot 2016-12-02 at 3 38 54 pm

I sovle by upgrading the os from 10.10.x to newest macOS, and the xcode.

If you are using the most recent version of react native (0.40 at time of post) - the proper import syntax has changed for your Objective C file:
#import
Replace with this. Same syntax will apply for importing RCTUtils or any other react library.

It would be more helpful if you could specify which "Objective C files" should be edited in this case.

RCTWeChat.h and RCTWeChat.m - or any file referencing a react native file. You'll need to change the import structure of any react file references for 0.40
https://github.com/facebook/react-native/releases/tag/v0.40.0

changing the import Line from #import "RCTBridgeModule.h" to #import "React/RCTBridgeModule.h"
solved my problem

@annelorraineuy Same error is comming in my project. I have tried and searched a lot but not able to fix. How did you fix it ?

I have tried the solutions above, none of them worked
where does this path $(SRCROOT)/../../react-native/React point to...?

change #import
to #import "RCTBridgeModule.h"

No solution stilll....

the solution for me was :
screen shot 2018-04-24 at 5 37 55

Thank you @BachirKhiati, it solved my issue I had with a "-cal" target for Calabash. 👍

For me it worked like this:

1) xcode -> build settings -> header search paths
2) add $(SRCROOT)/../node_modules/react-native-fbsdk/ios/RCTFBSDK

Where for you react-native-fbsdk is the name of you module and RCTFBSDK is the name of the subfolder

change #import "RCTBridgeModule.h" to #import "React/RCTBridgeModule.h"

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xclidongbo picture xclidongbo  ·  4Comments

eulo picture eulo  ·  4Comments

qubangliuhui picture qubangliuhui  ·  5Comments

phpsmarter picture phpsmarter  ·  5Comments

kinhunt picture kinhunt  ·  4Comments