CoreMotion Namespace

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

Classes

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.

CMAttitude

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

CMDeviceMotion

Encapsulates Attitude, Rotation Rate and Acceleration of the device.

CMDyskineticSymptomResult
CMGyroData

A single measurement of the device rotation rate.

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.

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.

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

Structs

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.

Enums

CMAttitudeReferenceFrame

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

CMAuthorizationStatus
CMError

Type for CoreMotion errors.

CMMagneticFieldCalibrationAccuracy

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

CMMotionActivityConfidence

An enumeration whose values specify the confidence in a CMMotionActivity.

CMPedometerEventType

Delegates

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

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, nint, CMStepUpdateHandler).

Remarks

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