Class

HKQuantitySeriesSampleBuilder

A builder object for incrementally building a sample that contains multiple quantities.

Declaration

@interface HKQuantitySeriesSampleBuilder : NSObject

Topics

Creating a Quantity Series Builder

- initWithHealthStore:quantityType:startDate:device:

Creates a new quantity series builder.

quantityType

The quantity type for the series.

startDate

The starting date and time for the sample.

device

The device providing the data.

Adding Values

- insertQuantity:date:error:

Adds a new quantity to the series at the provided date and time.

- insertQuantity:dateInterval:error:

Adds a new quantity to the series with the provided date interval.

Ending the Collection

- discard

Discards all previously collected data and invalidates the builder.

- finishSeriesWithMetadata:completion:

Finalizes the series and returns the resulting quantity samples.

- finishSeriesWithMetadata:endDate:completion:

Finalizes the series with the provided end date, and returns the resulting quantity samples.

Relationships

Inherits From