ActivityReporter

public protocol ActivityReporter

Protocol to which activity reporters/collectors should adhere.

See HealthKit/README.md for detailed instructions.

  • Retrieve activities performed between two given dates.

    Declaration

    Swift

    func reportForActivityPeriod(startingAt start: Date, until: Date, callback: @escaping ((ActivityReportPeriod?, Error?) -> Void))

    Parameters

    startingAt

    The start date

    until

    The end date

    callback

    The callback to call when all activities have been retrieved

  • Retrieve activity data with progressively increasing time intervals (1 day -> 1 month) up until today.

    Default Implementation

    Will retrieve activity data with progressively increasing time intervals (1 day -> 1 month).

    Declaration

    Swift

    func progressivelyCollatedActivityData(callback: @escaping ((ActivityReport, Error?) -> Void))

    Parameters

    callback

    The callback to call when all activities have been retrieved