Core Motion

Process accelerometer, gyroscope, pedometer, and environment-related events.


Core Motion reports motion- and environment-related data from the onboard hardware of iOS devices, including from the accelerometers and gyroscopes, and from the pedometer, magnetometer, and barometer. You use this framework to access hardware-generated data so that you can use it in your app. For example, a game might use accelerometer and gyroscope data to control onscreen game behavior.

Many services of this framework let you access both the raw values recorded by the hardware and a processed version of those values. Processed values do not include forms of bias that might adversely affect how you use that data. For example, a processed accelerometer value reflects only the acceleration caused by the user and not the acceleration caused by gravity.


First Steps

class CMMotionManager

The object for starting and managing motion services.

Device Motion

Deliver acceleration, attitude, rotation, and magnetic field data that is adjusted for gravity and other forms of bias.

Getting Processed Device-Motion Data

Retrieve data that has already been processed to remove environmental bias, such as the effects of gravity.

class CMDeviceMotion

Encapsulated measurements of the attitude, rotation rate, and acceleration of a device.

class CMAttitude

The device’s orientation relative to a known frame of reference at a point in time.


Deliver accelerometer data for all three axes of the device.

Getting Raw Accelerometer Events

Retrieve data from the onboard accelerometers.

class CMAccelerometerData

A data sample from the device's three accelerometers.

class CMRecordedAccelerometerData

A single piece of accelerometer data that was recorded by the device.

class CMSensorRecorder

The gathering and retrieval of accelerometer data from a device.

class CMSensorDataList

A list of the accelerometer data recorded by the system.


Deliver the raw gyroscope data.

Getting Raw Gyroscope Events

Retrieve data from the onboard gyroscopes.

class CMGyroData

A single measurement of the device’s rotation rate.


Provide step-counting data from the built-in motion processor.

class CMPedometer

An object for fetching the system-generated live walking data.

class CMPedometerData

Information about the distance traveled by a user on foot.

class CMPedometerEvent

A change in the user's pedestrian activity.

class CMStepCounter

The number of steps the user has taken with the device.



Provide compass-level orientation data and raw magnetometer data.

class CMMagnetometerData

Measurements of the Earth's magnetic field relative to the device.


Provide altitude data based on barometric sensor information.

class CMAltimeter

An object that initiates the delivery of altitude-related changes.

class CMAltitudeData

Data for a recorded change in altitude.

Historical Data

Deliver recorded motion events to help you analyze movement patterns.

class CMMotionActivityManager

An object that manages access to the motion data stored by the device.

class CMMotionActivity

The data for a single motion update event.

Common Data

class CMLogItem

The base class for all motion-related data objects.

Movement Disorder Manager

Monitoring Movement Disorders

Use Apple Watch’s movement disorder manager to monitor symptoms.

Adhering to the Movement Disorder Data Collection Requirements

Ensure that your users understand and have control over the data your app collects.

class CMMovementDisorderManager

A manager for recording and querying movement disorders.

class CMTremorResult

A result object that contains data about the presence and strength of tremors during a one-minute interval.

class CMDyskineticSymptomResult

A result object that contains data about the likely presence of dyskinetic symptoms during a one-minute interval.