Class

HKActivitySummary

An object that contains the move, exercise, and stand data for a given day.

Declaration

@interface HKActivitySummary : NSObject

Overview

You can read HKActivitySummary objects from the HealthKit store using an HKActivitySummaryQuery object. Unlike the HKSample subclasses, HKActivitySummary instances are mutable, but changes made to the object’s properties have no affect on the values in the HealthKit store.

You can instantiate your own HKActivitySummary objects (if needed), but you cannot save HKActivitySummary objects to the store.

You can display an active summary in iOS using the HKActivityRingView class or on watchOS using the WKInterfaceActivityRing class.

Topics

Accessing the Summary’s Data

activeEnergyBurned

The amount of active energy that the user has burned during the specified day.

activeEnergyBurnedGoal

The user’s daily goal for active energy burned.

appleExerciseTime

The amount of time that the user has spent exercising during the specified day.

appleExerciseTimeGoal

The user’s daily exercise goal.

appleStandHours

The number of stand hours that the user has earned during the specified day.

appleStandHoursGoal

The user’s daily goal for stand hours.

HKCategoryValueAppleStandHour

Categories used to indicate whether the user stood during the sample’s duration.

- dateComponentsForCalendar:

Date components that uniquely identify the day represented by the summary object.

Predicate Key Paths

HKPredicateKeyPathDateComponents

A key path for an activity summary’s date components.

Relationships

Inherits From

See Also

Activity Rings

HKActivitySummaryQuery

A query for read activity summary objects from the HealthKit store.

HKActivityRingView

A view that uses the Move, Exercise, and Stand activity rings to display data from a HealthKit activity summary object.