sample
A recording that the sensor reader fetches.
Declaration
@NSCopying var sample: SampleType { get }Discussion
The framework expects the app to know the result type based on the reader’s sensor.
Sample types
This property’s type is a superclass from which the framework derives discrete sample types. Depending on the sensor associated with your app’s sensor reader, type cast the fetch result’s sample to the sensor’s associated sample type. The following list provides the sample type per sensor:
- accelerometer
- ambientLightSensor
- ambientPressure
- deviceUsageReport
- faceMetrics
- heartRate
- keyboardMetrics
- mediaEvents
- messagesUsageReport
- odometer
- onWristState
- pedometerData
- phoneUsageReport
- rotationRate
- siriSpeechMetrics
- telephonySpeechMetrics
- visits
- wristTemperature