Instance Method

maximumQuantity

Returns the maximum value from all the samples that match the query.

Declaration

- (HKQuantity *)maximumQuantity;

Return Value

If the HKStatisticsOptionDiscreteMax option was set, this method returns a quantity object containing the maximum value from all the samples matching the query; otherwise, it returns nil.

See Also

Getting Statistics Data

- averageQuantity

Returns the average value from all the samples that match the query.

- averageQuantityForSource:

Returns the average value from all the samples that match the query and that were created by the specified source.

- maximumQuantityForSource:

Returns the maximum value from all the samples that match the query and that were created by the specified source.

- minimumQuantity

Returns the minimum value from all the samples that match the query.

- minimumQuantityForSource:

Returns the minimum value from all the samples that match the query and that were created by the specified source.

- sumQuantity

Returns the sum of all the samples that match the query.

- sumQuantityForSource:

Returns the sum of all the samples that match the query and that were created by the specified source.

- duration

Returns the total duration covering all the samples that match the query.

Beta
- durationForSource:

Returns the total duration covering all the samples created by the specified source that also match the query.

Beta

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software