pwmckenna / react-native-motion-manager

CMMotionManager wrapper for react-native
https://www.npmjs.com/package/react-native-motion-manager
247 stars 69 forks source link

Duplicate interface definition for RCT*.h on newer react versions #35

Open kkortes opened 7 years ago

kkortes commented 7 years ago

Imports changed in react native v0.40 which broke this library (out of the box). The fix is rather simple:

Change: // Accelerometer.m

import "RCTBridge.h"

import "RCTEventDispatcher.h"

To: // Accelerometer.m

import <React/RCTBridge.h>

import <React/RCTEventDispatcher.h>

for Gyrometer.m, Accelerometer.m and Magnetometer.m.

Do you have any plans to match the newer versions of react native? Love this repo!

(I don't know if simply changing the imports to <> will solve the issue for older installations).

pwmckenna commented 7 years ago

Hi @kkortes , I don't use this repo anymore, so I probably won't get around to updating it with what you're suggesting, but if you'd like to do it and make a PR I'd happily add you as a contributor and help you get the fix out the door.