Class

HKActivitySummary

An HKActivitySummary object contains a summary of the user’s activity for a given day.

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

var activeEnergyBurned: HKQuantity

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

var activeEnergyBurnedGoal: HKQuantity

The user’s daily goal for active energy burned.

var appleExerciseTime: HKQuantity

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

var appleExerciseTimeGoal: HKQuantity

The user’s daily exercise goal.

var appleStandHours: HKQuantity

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

var appleStandHoursGoal: HKQuantity

The user’s daily goal for stand hours.

func dateComponents(for: Calendar)

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

Constants

Predicate Key Paths

Constants that can be used to create predicate format strings.

Relationships

Inherits From