CMDeviceMotion control prototype in Swift