Contents

averageQuantity(for:)

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

Declaration

func averageQuantity(for source: HKSource) -> HKQuantity?

Parameters

  • source:

    A data source from the statistics object’s Sources array.

Return Value

If both the discreteAverage option and the separateBySource option were set, this method returns a quantity object. This object contains the average value from all the samples that match the query and that were created by the specified source. If the statistics options were not both set, this method returns nil

See Also

Related Documentation

Getting Statistics Data