upmoatUpmoat ↗
← All articles

HEALTHKIT · PERMISSIONS

What HealthKit permission does a step counter need?

A read-only step counter generally needs permission to read the HealthKit step-count quantity type. It does not need write permission just to display the person’s existing step data.

The minimum permission

For an app whose job is to display existing steps, the relevant HealthKit type is HKQuantityTypeIdentifier.stepCount. The app requests authorization to read that data from the HealthKit store.

Read only means read only

A step viewer does not need permission to write step samples merely to calculate and display progress. If an app has no legitimate reason to save a HealthKit data type, it should not request write access for it.

Ask when the feature needs it

HealthKit is built around user permission and control. The clean product pattern is to explain why step access is needed, request the narrowest useful set of types, and keep the rest of the app usable where practical if the person chooses not to share data.

Primary sources: Apple — HealthKit · Apple — step count data type