React-native-config: React/RCTBridgeModule.h file not found

Created on 21 Feb 2017  路  9Comments  路  Source: luggit/react-native-config

react-native: 0.40.0
react-native-config: 0.3.1
react-native-cli: 2.0.1
XCode: Version 8.1 (8B62)
CocoaPods: 1.2.0

I've configured everything based on the README.
(the project is opened *.xcworkspace in XCode)

  1. react-native-config was linked
    screen shot 2017-02-21 at 9 40 16 pm
    screen shot 2017-02-21 at 9 43 06 pm
    screen shot 2017-02-21 at 9 44 31 pm
  1. Product -> Clean
  2. Product -> Build -> Failed
    screen shot 2017-02-21 at 9 48 22 pm

Could help me to understand why it doesn't work and what is the root cause?
Thank you in advance!

Most helpful comment

@bitsal
Do you list 'React' on Build > Targets before application?

targets

If you created new scheme, your application might be there but React isn't as default.

All 9 comments

It doesn't work when I run it via react-native run-ios as well.

Any ideas?
Any help is appreciated.

@bitsal
Do you list 'React' on Build > Targets before application?

targets

If you created new scheme, your application might be there but React isn't as default.

@KazuyaHara
Yes, It is there. I've already read about such fix and one more like disabling parallel builds.

I'm also seeing the same error.

As a temporary work-around to unstick me, I edited the ReactNativeConfig.h file and changed the import to: #import "RCTBridgeModule.h"

@peterept does it work with React Native >= 0.40.0?

Guys, it really blocks us using new react-native > 0.40.x. I wonder if it works for someone with new react native.

@bitsal have you found a workaround for this using RN 0.40x ?

@eugenehp No, we've eliminated react-native-config from the project in favor of custom approach due to lack of contribution. It seems only one guy is a real contributor here, it's not convenient for us waiting for the response and real help for ages.

FYI,
I don't know if it helps (we stopped using react-native-config).
If you use Cocoapods some of the libraries are linked incorrectly:
Libraries that you link via Cocoapods still should be under Libraries folder but not in linking section (I mean e.g. libReact.a).

E.g. some of my issues have gone when I:

  1. added React.xcodeproj under Libraries
  2. added React to the schema -> Build -> targets (BUT not from Pods, only from React.xcodeproj)
  3. removed libReact.a from Build Phases -> Link Binary With Libraries section
Was this page helpful?
0 / 5 - 0 ratings