The gathering and retrieval of accelerometer data from a device.
- iOS 9.0+
- Mac Catalyst 13.0+
- watchOS 2.0+
- Core Motion
Use a sensor recorder to initiate the gathering of accelerometer data. Later, use the sensor recorder to fetch the recorded data so that 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
record 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. Listing 1 shows how to record 20 minutes worth of accelerometer data.