How can I access the data on the accelerometer on the Apple Watch?

I am a beginner of the Apple Watch programming. I want to create an watch application that I can alert the diebetics people by analysis the data that from the accelerometer and the gyroscope. And I don't know how to get the freequency of the movement of the accelerometer and the gyroscope. Could you help me with that? Thanks!

Replies

You can access accelerometer with CMMotionManager in CoreMotion framework.


Gyroscope and magnetometer are not available.


If you want to access heart rate you may use HKWorkout from HealthKit.