react-native-background-timer icon indicating copy to clipboard operation
react-native-background-timer copied to clipboard

'React/RCTBridge.h' file not found

Open bhram opened this issue 7 years ago • 12 comments

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

bhram avatar Apr 05 '18 13:04 bhram

??

bhram avatar Apr 06 '18 11:04 bhram

same here react-native 0.54.4

Xaus avatar Apr 09 '18 06:04 Xaus

For me it was fixed when downgrading from CocoaPods 1.5.0 to 1.4.0.

felixmohnert avatar May 04 '18 12:05 felixmohnert

downgrading what !?

bhram avatar May 04 '18 16:05 bhram

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

jgreen210 avatar May 08 '18 11:05 jgreen210

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

jgreen210 avatar May 08 '18 15:05 jgreen210

@bhram Downgrading CocoaPods, as I already wrote in my entry above yours.

@jgreen210 Interesting finding!

felixmohnert avatar May 08 '18 15:05 felixmohnert

https://github.com/ocetnik/react-native-background-timer/issues/71#issuecomment-387458627 has a suggestion for this (RCTBridge.h) issue.

jgreen210 avatar May 08 '18 16:05 jgreen210

Still an issue..

ivmos avatar Jun 08 '18 16:06 ivmos

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.

mjgallag avatar Jun 17 '18 17:06 mjgallag

Upgrade to 2.1.1 seems to fix this issue as well.

pencilcheck avatar Jan 17 '19 00:01 pencilcheck

still an issue

shoryavaish avatar Aug 22 '19 11:08 shoryavaish