Contents

heartRate

A sensor that provides the user’s heart rate data.

Declaration

static let heartRate: SRSensor

Discussion

The sample type for this sensor is CMHighFrequencyHeartRateData.

You need to provide a reason to record heart rates by adding the SRSensorUsageHeartRate dictionary to the NSSensorKitUsageDetail key in the information property list.

See Also

Reading user activity sensors