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

[iOS] 'RCTBridgeModule.h' file not found #2

Closed
urikphytech opened this issue Jul 26, 2017 · 15 comments
Closed

[iOS] 'RCTBridgeModule.h' file not found #2

urikphytech opened this issue Jul 26, 2017 · 15 comments
Assignees

Comments

@urikphytech
Copy link

After installing library using cocoa pods i'm getting the following error:

'RCTBridgeModule.h' file not found in RNHeap.h

Here are some of my configurations:
Podfile:

platform :ios, '8.0'

target 'PhytechApp' do
  pod "react-native-heap-analytics", path: "../node_modules/react-native-heap-analytics"
end

Header search paths include:
$(SRCROOT)/../node_modules/react-native-heap-analytics/ios (non-recursive)

Anything else I can provide?
Thanks!
Uri

@negativetwelve
Copy link
Owner

Hi @urikphytech, thanks for writing in. What version of react-native are you on? This module only works with <0.40 unfortunately. However, let me take a look at what it would take to upgrade. I'll post here with an update soon

@negativetwelve negativetwelve changed the title 'RCTBridgeModule.h' file not found [iOS] 'RCTBridgeModule.h' file not found Jul 26, 2017
@negativetwelve negativetwelve self-assigned this Jul 26, 2017
@urikphytech
Copy link
Author

Thanks for the response. I'm using 0.42.0

@negativetwelve
Copy link
Owner

Released version 1.0.0, want to give it a try @urikphytech? https://www.npmjs.com/package/react-native-heap-analytics

@urikphytech
Copy link
Author

@negativetwelve Thanks! Now i'm getting this error:

/Users/uriklar/Code/MyProject/node_modules/react-native-heap-analytics/ios/RNHeap.m:11:9: fatal error: 'Heap.h' file not found
#import "Heap.h"

@negativetwelve
Copy link
Owner

yeah that's the main library not being found - you're using cocoapods correct? Make sure you run pod install and also check that you set the header search paths to recursive for the node_modules/react-native-heap-analytics

@urikphytech
Copy link
Author

urikphytech commented Jul 26, 2017

Yeah, initialized a podfile and added the code you mentioned in the readme.

I changed the header search path to recursive, and now i'm getting the original error again :-/
'React/RCTBridgeModule.h' file not found in RNHeap.h

@negativetwelve
Copy link
Owner

If you expand the Pods project, are you able to see Heap here?

image

@urikphytech
Copy link
Author

urikphytech commented Jul 27, 2017

Yes
I also tried adding $(SRCROOT)/Pods (recursive) to RNHeap's Header Search Paths

@negativetwelve
Copy link
Owner

hmm I was trying to reproduce this on a small react-native project but couldn't. I'll keep comparing the differences between my project and the readme, but if you could supply a reproducible project that would be super helpful

@negativetwelve
Copy link
Owner

Hey @urikphytech, have you tried this? facebook/react-native#12042 (comment)

Basically add React to the build phrase of your project, uncheck parallelize builds, then move React to build before your project. Let me know if that helps

@negativetwelve
Copy link
Owner

hey @urikphytech just checking in, was the above solution above to make it work?

@urikphytech
Copy link
Author

Hey @negativetwelve, thanks for you help. Due to time constraints I ended up integrating mixpanel so I hadn't had the chance to try your suggestion. I promise to give it a try once I have some free time.

Again, thanks a lot for your help!

@negativetwelve
Copy link
Owner

no worries, thanks for following up!

@negativetwelve
Copy link
Owner

Hi @urikphytech, just wanted to follow up on this because I reproduced it in another project I'm working on!

Turns out, if you have the react-native-heap-analytics package installed via react-native link and cocoapods, you'll end up with two copies. The react-native link version installed in the project file under Libraries won't be able to find the reference to Heap. If you just remove RNHeap from the Libraries directory in Xcode, that should fix the problem.

Let me know if you have a chance to try it out! I'm going to close this for now since that fixed the issue for me!

@negativetwelve
Copy link
Owner

You'll also have to remove RNHeap under Linked Frameworks and Libraries

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

No branches or pull requests

2 participants