Instance Property


The quantity type samples that the data source automatically sends to the workout builder.


@property(copy, readonly) NSSet<HKQuantityType *> *typesToCollect;


Apple Watch automatically collects the listed data types and sends the data to the workout builder. The available data types vary depending on the user’s settings and the workout configuration, and can include types like HKQuantityTypeIdentifierBasalEnergyBurned, HKQuantityTypeIdentifierActiveEnergyBurned, HKQuantityTypeIdentifierHeartRate, HKQuantityTypeIdentifierDistanceWalkingRunning, HKQuantityTypeIdentifierDistanceCycling, HKQuantityTypeIdentifierDistanceSwimming, or HKQuantityTypeIdentifierDistanceWheelchair.

To monitor this data, add a delegate to the session’s HKLiveWorkoutBuilder object, and implement its workoutBuilder:didCollectDataOfTypes: method.

See Also

Creating a Live Data Source

- initWithHealthStore:workoutConfiguration:

Creates a new data source based on the provided workout configuration.