This example is from Apple official sample code. https://developer.apple.com/library/content/samplecode/MotionGraphs/Introduction/Intro.html#//apple_ref/doc/uid/DTS40012333-Intro-DontLinkElementID_2
It demonstrates how to receive updates from sensors using Core Motion. It displays graphs of accelerometer, gyroscope and device motion data.