SensorKit
Retrieve data and derived metrics from sensors on an iPhone, or paired Apple Watch.
Overview
As the system gathers information using various sensors on a device, SensorKit enables an app to access select raw data, or metrics that the system processes from a sensor, such as:
Steps information
Accelerometer or rotation-rate data
The configuration of a watch on the user’s wrist
Ambient light in the physical environment
Details about a user’s routine commute or travel
See SRSensor for the complete list.
Topics
Essentials
Setup
Authorization
Querying data
Interpreting data
SRAmbientLightSampleSRDeviceUsageReportSRKeyboardMetricsSRMediaEventSRMessagesUsageReportSRPhoneUsageReportSRVisitSRWristDetection
Deleting samples
Analyzing speech
Analyzing faces
Recording wrist temperatures
Recording ectrocardiogram data
Recording photoplethysmogram data
Classes
Protocols
Structures
SRAccelerometerSensorSRAcousticSettingsSensorSRAmbientLightSensorSRAmbientPressureSensorSRDeviceUsageSensorSRElectrocardiogramSensorSRFaceMetricsSensorSRFetchResponseSRHeadphoneMotionSensorSRHeadphoneSettingsSensorSRHeartRateSensorSRKeyboardMetricsSensorSRMediaEventsSensorSRMessagesUsageSensorSROdometerSensorSROnWristStateSensorSRPedometerDataSensorSRPhoneUsageSensorSRPhotoplethysmogramSensorSRRotationRateSensorSRSiriSpeechMetricsSensorSRSleepSessionsSensorSRTelephonySpeechMetricsSensorSRVisitsSensorSRWristTemperatureSensor