Toggle Menu

Getting rotation information with react native a module for iOS


After trying React with redux cross my mind to check React Native.

I Did the usual “hello world” and yes.. is amazing. Thing is, this got me thinking about accessing to the native side of the app when you need that 20% extra work to finish your development.

Because I was already playing with the giroscope, cross my mind to get some rotational information from the device.

I found no library for this purpose that night, and so this was a good excuse to create a little library and test how these pieces fit together.

To my surprise, it was not that hard and some minutes later I had something working.

RNDeviceAngles

Source code

Get the source code from GitHub

Source Code