iOS Developer Library — Pre-Release

Developer

Core Motion Framework Reference

Core Motion Framework Reference

Classes  

The Core Motion framework lets your application receive motion data from device hardware and process that data. The framework supports accessing both raw and processed accelerometer data using block-based interfaces. For devices with a built-in gyroscope, you can retrieve the raw gyro data as well as processed data reflecting the attitude and rotation rates of the device. You can use both the accelerometer and gyro-based data for games or other apps that use motion as input or as a way to enhance the overall user experience.

Classes

Class

Abstract

NSObject

NSObject is the root class of most Objective-C class hierarchies.

CMAltimeter

Use a CMAltimeter object to initiate the delivery of altitude-related data to your app.

CMAttitude

An instance of the CMAttitude class represents a measurement of the device’s attitude at a point in time.

CMLogItem

The CMLogItem class is a base class for Core Motion classes that handle specific types of motion events.

CMAccelerometerData

An instance of the CMAccelerometerData class represents an accelerometer event.

CMAltitudeData

A CMAltitudeData object encapsulates information about relative changes in altitude.

CMDeviceMotion

An instance of CMDeviceMotion encapsulates measurements of the attitude, rotation rate, and acceleration of a device.

CMGyroData

An instance of the CMGyroData class contains a single measurement of the device’s rotation rate.

CMMagnetometerData

Instances of the CMMagnetometerData class encapsulated measurements of the magnetic field made by the device’s magnetometer.

CMMotionActivity

The CMMotionActivity class contains the data for a single motion update event.

CMMotionActivityManager

The CMMotionActivityManager class provides access to the motion data stored by a device.

CMMotionManager

A CMMotionManager object is the gateway to the motion services provided by iOS.

CMPedometer

Use a CMPedometer object to fetch pedestrian-related data.

CMPedometerData

A CMPedometerData object encapsulates information about the distance traveled by a user on foot.

CMStepCounter

The CMStepCounter class provides access to the number of steps the user has taken with the device.