GregWilson / react-native-apple-healthkit

A React Native bridge module for interacting with Apple HealthKit data
176 stars 42 forks source link

Build getting failed #36

Closed ghost closed 7 years ago

ghost commented 7 years ago

I'm using following things: React Native: 0.46.1 react-native-apple-healthkit: 0.2.1

What I did: I install react-native-apple-healthkit then I run command: react-native link Problem is: When I'm running project from Xcode, It's giving me error : Duplicate interface definition for class "RCTBridge"

Can anyone please help me on above?

Thanks, In advance.

xuyukuan commented 7 years ago

+1

janstuemmel commented 7 years ago

maybe try install without react-native link, or downgrade react native ?

jgking2 commented 7 years ago

@jvarshaprdxn Not sure if you were able to resolve or not, but this has to do with the React Native version. You'll need to go into the node_modules for this project, and update the imports as such: --Currently in some of the obj c files.

import "RCTBridge.h"

import "RCTEventDispatcher.h"

--Change to this, and it'll work.

import "React/RCTBridge.h"

import "React/RCTEventDispatcher.h"

yamazaki-sensei commented 7 years ago

@jgking2 Thanks, this seems working fine in my case.

terrillo commented 7 years ago

@jvarshaprdxn @xuyukuan new fork of the same project on NPM. https://www.npmjs.com/package/rn-apple-healthkit. Also please take note of https://github.com/GregWilson/react-native-apple-healthkit/pull/38