Share via


CoreMotion Namespace

The CoreMotion namespace provides access to motion data, including device acceleration and orientation, altitude, compass, and pedometer.

Classes

Name Description
CMAbsoluteAltitudeData
CMAccelerometerData

An accelerometer event, encapsulates an instance of CMAcceleration

CMAltimeter

Interface to the relative-altitude pressure sensor.

CMAltitudeData

Holds relative-altitude data, generated by the CMAltitudeData class.

CMAmbientPressureData
CMAttitude

Used to pull spacial information from the device in either quaternion, rotation matrix or with 3D angles (roll, pitch and yaw).

CMBatchedSensorManager
CMDeviceMotion

Encapsulates Attitude, Rotation Rate and Acceleration of the device.

CMDyskineticSymptomResult
CMErrorExtensions

Extension methods for the CMError enumeration.

CMGyroData

A single measurement of the device rotation rate.

CMHeadphoneActivityManager
CMHeadphoneMotionManager
CMHeadphoneMotionManagerDelegate

This is a class that implements the interface ICMHeadphoneMotionManagerDelegate (for the protocol CMHeadphoneMotionManagerDelegate).

Subclass this class to easily create a type that implements the protocol.

An alternative is to create a subclass of NSObject and then implemented the interface ICMHeadphoneMotionManagerDelegate.

CMHeadphoneMotionManagerDelegate_Extensions

Extension methods to the ICMHeadphoneMotionManagerDelegate interface to support all the methods from the CMHeadphoneMotionManagerDelegate protocol.

CMHighFrequencyHeartRateData
CMLogItem

Base class for CMAccelerometerData, CMDeviceMotion and CMGyroData, it is used to attach a timestamp to these events.

CMMagnetometerData

A reading from the device magnetometer.

CMMotionActivity

A motion update event, including characterization of the likely form (walking, running, automotive).

CMMotionActivityManager

On supported devices, accesses stored motion data and allows monitoring of motion updates.

CMMotionManager

Core class that provides access to the motion services in iOS.

CMOdometerData
CMPedometer

Generates step-counting data, including number of steps and floors climbed/descended.

CMPedometerData

Holds data relating to walking and floor-climbing. Generated by CMPedometer.

CMPedometerEvent
CMRecordedAccelerometerData

Accelerometer data stored by a CMSensorRecorder.

CMRecordedPressureData
CMRecordedRotationRateData
CMRotationRateData
CMSensorDataList

A system-provided list of objects that contain recorded Core Motion accelerometer data.

CMSensorRecorder

Gathers and retrieves accelerometer data.

CMStepCounter

On supported devices, stores the number of steps the user has taken with the device and allows step-counting to be dynamically tracked.

CMTremorResult
CMWaterSubmersionEvent
CMWaterSubmersionManager
CMWaterSubmersionManagerDelegate

This is a class that implements the interface ICMWaterSubmersionManagerDelegate (for the protocol CMWaterSubmersionManagerDelegate).

Subclass this class to easily create a type that implements the protocol.

An alternative is to create a subclass of NSObject and then implemented the interface ICMWaterSubmersionManagerDelegate.

CMWaterSubmersionMeasurement
CMWaterTemperature

Structs

Name Description
CMAcceleration

A 3D vector containing acceleration values.

CMCalibratedMagneticField

Encapsulates the accuracy and field strength of the magnetometer after calibration.

CMMagneticField

Represents the 3-axis magnetometer data in microteslas.

CMQuaternion

Represents a Quaternion, used as one of the possible CMAttitude representations.

CMRotationMatrix

Represents a 3x3 rotation matrix.

CMRotationRate

3D rotation rate.

Interfaces

Name Description
ICMHeadphoneMotionManagerDelegate

This interface represents the Objective-C protocol CMHeadphoneMotionManagerDelegate.

ICMWaterSubmersionManagerDelegate

This interface represents the Objective-C protocol CMWaterSubmersionManagerDelegate.

Enums

Name Description
CMAttitudeReferenceFrame

An enumeration whose values specify the reference frame from which CMAttitude readings are referenced.

CMAuthorizationStatus
CMDeviceMotionSensorLocation
CMError

Type for CoreMotion errors.

CMHeadphoneActivityStatus
CMHighFrequencyHeartRateDataConfidence
CMMagneticFieldCalibrationAccuracy

An enumeration whose values specify the quality of the magnetometer calibration.

CMMotionActivityConfidence

An enumeration whose values specify the confidence in a CMMotionActivity.

CMOdometerOriginDevice
CMPedometerEventType
CMWaterSubmersionDepthState
CMWaterSubmersionState

Delegates

Name Description
CMAccelerometerHandler

A delegate signature used to receive events from CMMotionManager

CMDeviceMotionHandler

A delegate signature used to receive events from CMMotionManager

CMGyroHandler

A delegate signature used to receive events from CMMotionManager

CMHeadphoneActivityHandler
CMHeadphoneActivityStatusHandler
CMHeadphoneDeviceMotionHandler
CMMagnetometerHandler

A delegate that is the handler for the StartMagnetometerUpdates(NSOperationQueue, CMMagnetometerHandler) method.

CMMotionActivityHandler

The delegate that acts as the handler for QueryActivity(NSDate, NSDate, NSOperationQueue, CMMotionActivityQueryHandler).

CMMotionActivityQueryHandler

The delegate that is the handler for StartActivityUpdates(NSOperationQueue, CMMotionActivityHandler).

CMStepQueryHandler

The delegate for use with QueryStepCount(NSDate, NSDate, NSOperationQueue, CMStepQueryHandler).

CMStepUpdateHandler

The delegate used with StartStepCountingUpdates(NSOperationQueue, IntPtr, CMStepUpdateHandler).

Remarks

The CoreMotion API allows developers to get hardware events from the built-in accelerometer and gyroscopes.