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

'RCTEventEmitter.h' file not found #67

Closed
FrenchBully opened this issue Nov 16, 2017 · 16 comments · Fixed by #248
Closed

'RCTEventEmitter.h' file not found #67

FrenchBully opened this issue Nov 16, 2017 · 16 comments · Fixed by #248

Comments

@FrenchBully
Copy link

Getting this error on build
'RCTEventEmitter.h' file not found

I've tried replacing with:
'React/RCTEventEmitter.h'

@yinghang
Copy link

yinghang commented Nov 17, 2017

Does 'React/RCTEventEmitter.h' work for you then? In terms of the import paths, it all depends on the RN version that you're running.

@FrenchBully
Copy link
Author

I'm running RN 0.49.3, and React/RCTEventEmitter.h doesn't work

@yinghang
Copy link

Try <React/RCTEventEmitter.h>. Also, did you set up header search paths the right way?

@FrenchBully
Copy link
Author

FrenchBully commented Nov 21, 2017

thanks, yea I tried <React/RCTEventEmitter.h> with no luck. Header Search Path set has $(SRCROOT)/../node_modules/react-native-background-timer/ios non-recursive

@yinghang
Copy link

You'd prob want something like $(SRCROOT)/../node_modules/react-native/ too since RCTEventEmitter.h would live inside the react-native folder. And try setting it to a recursive search.

@FrenchBully
Copy link
Author

no luck still.

@FrenchBully
Copy link
Author

has anyone been able to get this working?

@SprinterOPO
Copy link

SprinterOPO commented Dec 29, 2017

Try to add below dependency to your Podfile (to the top of your target section - before pod 'react-native-background-timer' line):

pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'BatchedBridge', # Required For React Native 0.45.0+
    'Core',
    # Add any other subspecs you want to use in your project
]

Then run pod install and see if it works now.

@bytesleo
Copy link

Hi guys, this solution works!

Add lines to ios/Podfile

pod 'React', :path => '../node_modules/react-native'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'react-native-background-timer', :path => '../node_modules/react-native-background-timer'
...

@hnliyuan
Copy link

hnliyuan commented Feb 6, 2018

tried replacing with:
'React/RCTEventEmitter.h'
It's works for me .
"react-native": "0.51.0",
"react-native-background-timer": "^2.0.0",

@erick2014
Copy link

erick2014 commented Mar 9, 2018

I was getting this error:
React/RCTBridgeModule.h' file not found
#import <React/RCTBridgeModule.h>

and I did this : #78

@ocetnik
Copy link
Owner

ocetnik commented Aug 22, 2018

Hi @FrenchBully @yinghang @SprinterOPO @kevoj @hnliyuan @erick2014,

could you please test it with version 2.1.0-alpha.5 and let me know if it works, please?

Thanks.
David

@pankti1210
Copy link

pankti1210 commented Jun 3, 2019

i am facing the same issue.. can anyone please help ?
React native version: 0.57.7
React Native Background timer: 2.0.0
COCOAPODS: 1.5.3

i tried with React Native Background timer versions 2.1.1 and 2.1.0 also but getting the same issue.

@sharadkatre19
Copy link

Adding these two pods in Podfile Worked For Me.

pod 'React', :path => '../node_modules/react-native'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

Thanks.

@aangeles2807
Copy link

this worked for me!

microsoft/react-native-code-push#1565 (comment)

@jiteshstack
Copy link

At my end i have tried, replace #import RCTEventEmitter.h or #import React/RCTEventEmitter.h with #import <React/RCTEventEmitter.h>

And Its work for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.