CMSensorRecorder
An object that gathers and retrieves accelerometer data from a device.
Declaration
class CMSensorRecorderMentioned in
Overview
Use a sensor recorder to initiate the gathering of accelerometer data. Later, use the sensor recorder to fetch the recorded data so you can analyze it. You might use the recorded data to assess specific types of motion and incorporate the results into your app.
To use a sensor recorder, create an instance of this class and call the recordAccelerometer(forDuration:) method to begin recording data. You do not need to stop the recording process explicitly. The system stops recording automatically when the specified time expires and no other apps extend the recording time. The following example shows how to record 20 minutes worth of accelerometer data:
Topics
Checking the Availability of Sensor Recording
isAccelerometerRecordingAvailable()authorizationStatus()CMAuthorizationStatusisAuthorizedForRecording()