WTExternalCMMotionManagerDataAccessModePullDelegate Protocol Reference
Conforms to | NSObject |
---|---|
Declared in | WTExternalCMMotionManagerDataAccessMode.h |
Overview
WTExternalCMMotionManagerDataAccessModePullDelegate defines optional methods that are used from the SDK to get the most recent sensor values.
– currentDeviceMotion
this method is called in case the current device is capable of delivering device motion data
This method is called in case the device returns YES for the CMMotionManager property deviceMotionAvailable
and the CMMotionManager property availableAttitudeReferenceFrames
contains the reference frame that was returned from the WTExternalCMMotionManagerDataAccessMode class method +requiredAttitudeReferenceFrameForFeatures:
A typical implementation looks like this:
- (CMDeviceMotion *)currentDeviceMotion { return self.externalMotionManager.deviceMotion; }
- (CMDeviceMotion *)currentDeviceMotion
Declared In
WTExternalCMMotionManagerDataAccessMode.h
– currentAccelerometerData
this method is called in case the current device is not capable of delivering device motion data
A typical implementation looks like this:
- (CMAccelerometerData *)currentAccelerometerData { return self.externalMotionManager.accelerometerData; }
- (CMAccelerometerData *)currentAccelerometerData
Declared In
WTExternalCMMotionManagerDataAccessMode.h
– currentHeading
this method is called in case the current device is not capable of delivering device motion data or is running iOS 10.0.x until iOS 10.1.0
It’s implementation is supposed to return the heading that is available from the CLLocationManager class.
- (CLHeading *)currentHeading
Declared In
WTExternalCMMotionManagerDataAccessMode.h