'React/RCTBridge.h' file not found
i try build for ios but show this error
'React/RCTBridge.h' file not found
this my pods
pod 'React', :path => '../node_modules/react-native', :subspecs =>[
'DevSupport',
'Core',
'RCTNetwork',
'CxxBridge',
]
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'react-native-background-timer', :path => '../node_modules/react-native-background-timer'
my react native version
react-native 0.54.2
??
same here react-native 0.54.4
For me it was fixed when downgrading from CocoaPods 1.5.0 to 1.4.0.
downgrading what !?
~~I also found this issue on upgrading cocoapods to 1.5.0.~~
Update: no I didn't, I saw a very similar error (i.e. RCTBridgeModule.h not RCTBridge.h):
node_modules/react-native-background-timer/ios/RNBackgroundTimer.h:9:9: fatal error: 'React/RCTBridgeModule.h' file not found
I don't fully understand what's going on, but (from fixing similar problems for some other libraries, and since it makes our build work again) it looks like cocoapods 1.5.0 needs a dependency on React in the podspec. I was therefore able to avoid this issue (for now, until we need something in a future release of this library) by downgrading react-native-background-timer from 2.0.1 to 2.0.0 (since the only commit in 2.0.1 was https://github.com/ocetnik/react-native-background-timer/commit/bdcf4986bc9758192b6f88626ecc7c669db72b59).
This discussion (for an unrelated library) might be relevant:
https://github.com/rebeccahughes/react-native-device-info/commit/ca844d5570f2f9b6a3800e4700d1e3cbae6b6251 https://github.com/rebeccahughes/react-native-device-info/pull/361
The React dependency in the podspec was removed in 2.0.1 in this PR: https://github.com/ocetnik/react-native-background-timer/issues/71
@bhram Downgrading CocoaPods, as I already wrote in my entry above yours.
@jgreen210 Interesting finding!
https://github.com/ocetnik/react-native-background-timer/issues/71#issuecomment-387458627 has a suggestion for this (RCTBridge.h) issue.
Still an issue..
The fix for #71 in 2.0.1 is the cause of this issue as it breaks iOS build for ReactNative 0.55.4 and CocoaPods 1.5.3. When I revert to 2.0.0 the build succeeds.
Upgrade to 2.1.1 seems to fix this issue as well.
still an issue