vnil / react-native-simple-compass

React Native module for iOS used to receive the phones heading
MIT License
42 stars 47 forks source link

Not working in React Native 0.49.3 #6

Open cweems opened 6 years ago

cweems commented 6 years ago

Working on a side project with react native that uses this project. I'm new to working with RN so apologies if the answer is obvious.

After following the setup instructions (running react-native-simple-compass --save and react-native link) I encounter the following error when importing RNSimpleCompass:

undefined is not an object (evaluating 'RNSimpleCompass.start')

I'm using React Native 0.49.3 with ViroReact. Has anyone else encountered this issue?

jmkovachi commented 6 years ago

Yes, I have too. Were you able to resolve it?

lfiorini commented 6 years ago

If you're using Android check if MainApplication.java has been updated. If not you have to manually do it as reported in the README.

amritaramnauth commented 6 years ago

I'm having this issue too. To be exact, it says "Cannot read property start of undefined". I'm using React Native 0.49.3 along with ViroReact 2.4.0 on an iOS device. Was anyone able to resolve?

VikAdvani commented 6 years ago

Hi @amyramnauth, @lfiorini, @jmkovachi, @cweems Since react-native-simple-compass is a native module it won't work with the Viro Testbed app. Make sure you are using Android Studio or XCode if you want to use this module with Viro :)