martincik/react-native-hockeyapp

Building on iOS fails after npm install react-native-hockeyapp and rnpm link

arthurvi opened this issue · 6 comments

I only ran the following 2 commands:

npm install --save react-native-hockeyapp
rnpm link

This all goes well. But then the IOS app (haven't tried Android) won't build anymore. I get the following error in Xcode:
node_modules/react-native-hockeyapp/ios/RNHockeyApp/RNHockeyApp.h:4:9: 'RCTBridgeModule.h' file not found

Any ideas? Really struggling to get it working.

It doesn't build because Header Search Paths for RNHockeyApp are not properly set after rnpm link.

You can get it to build by adding $(SRCROOT)/../../react-native/React to RNHockeyApp.xcodeproj in "Build Settings".

I guess something's not configured as it should be in the package.

Seems there's more to do to get it working correctly (pod install removed the RNHockeyApp from my project)…

I don't really know what to do 🙄

Hmm, too bad. I can't get it working either with your fix. Maybe @martincik does know more.. I tried to get it working manually but without effect.

r0b1n commented

@fantattitude
@arthurvi

How I figured out with this on iOS:
Just like Facebook does it for react-native-fbsdk libs.

  1. Removed Libraries folder, including React. (moved to Pods).
  2. Added this podspec file to my repo. Hope this repo will have podspec soon.
  3. Added to my Podfile:
  ... 
  pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'Core',
    'RCTImage',
    # < other needed react libs here >
  ]

  # HockeySDK itself
  pod "HockeySDK" 
  # And HockeySDK react binding
  pod 'react-native-hockeyapp', :path => '../node_modules/react-native-hockeyapp/ios'
  ...
  1. pod install

And that is it. No additional steps needed for iOS

The way we've been using podfiles doesn't require each dev (or build machine) to have cocoapods installed. With this approach, pod install seems to be modifying the plugin inside of node_modules. There's gotta be a better way to do this.

You might want to revert e9cd9b7 until this issue can be resolved

I've released new version 0.4.1 that is reverting this commit.