A type that identifies activity summary objects.
SDKs
- iOS 9.3+
- Mac Catalyst 13.0+
- watchOS 2.2+
Framework
- Health
Kit
Declaration
class HKActivitySummaryType : HKObject Type
Overview
The HKActivity
class is a concrete subclass of the HKObject
class. To create an activity summary type instance, use the object type’s activity
convenience method.
You only use activity summary types to request permission to read HKActivity
objects from the HealthKit store. To query for activity summary objects, use an HKActivity
. You can also create your own HKActivity
objects (for example, to display in an HKActivity
), but you cannot save them to the HealthKit store. However, any workouts that you save to the HealthKit store may affect that day’s summary. For more information, see Filling the Rings.
Note
Although you can request permission to read HKActivity
objects, you cannot request permission to share them.
Using Activity Summary Types
Like many HealthKit classes, activity summary types are not extensible and should not be subclassed.