Enumeration Case

HKErrorDatabaseInaccessible

The HealthKit data is unavailable because the HealthKit data is protected and the device is locked.

Declaration

HKErrorDatabaseInaccessible

Discussion

This error occurs when your app queries for HealthKit data while the device is locked. You can, however, still save data. This data is saved into a temporary file, which is merged with HealthKit’s data when the user unlocks their device.