A type that identifies activity summary objects.
- iOS 9.3+
- Mac Catalyst 13.0+
- watchOS 2.2+
Use the activity summary type to request permission to read
HKActivity objects from the HealthKit store. To create an activity summary type, use the
activity convenience method.
HKActivity class is a concrete subclass of the
HKObject class. Like many HealthKit classes, activity summary types aren’t extensible and you shouldn’t subclass them.
Access and Modify Activity Summaries
Any workouts that you save to the HealthKit store may affect that day’s summary. For more information, see Using Workout Samples.
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 can’t save them to the HealthKit store.