Skip to content

BloodKetones identifier does not match HealthKit; BloodKetone cannot be queried #379

Description

@sfourdrinier

Summary

Verified against Apple's current HealthKit SDK (Xcode iOS 26.5 HKTypeIdentifiers.h) and against @kingstinct/react-native-healthkit 14.1.0 on device (iOS 26.6.1).

Blood ketones: this package advertises a type Apple does not ship

Apple's current HKTypeIdentifiers.h declares HKQuantityTypeIdentifierBloodGlucose, HKQuantityTypeIdentifierBloodAlcoholContent, and the blood-pressure quantity types. It does not declare HKQuantityTypeIdentifierBloodKetone or HKQuantityTypeIdentifierBloodKetones.

This package's generated schema and Nitro enums still include HKQuantityTypeIdentifierBloodKetones.

On device, queryQuantitySamples("HKQuantityTypeIdentifierBloodKetones") fails with:

Failed to initialize unrecognized quantityType with identifier HKQuantityTypeIdentifier(_rawValue: HKQuantityTypeIdentifierBloodKetones)

That matches HKQuantityType.quantityType(forIdentifier:) returning nil for a string that is not an Apple identifier.

Passing Apple's historical singular spelling HKQuantityTypeIdentifierBloodKetone fails earlier in Nitro:

Cannot convert "HKQuantityTypeIdentifierBloodKetone" to enum QuantityTypeIdentifier - invalid value!

Please drop HKQuantityTypeIdentifierBloodKetones from the public identifier union, or only expose identifiers that exist in the current HealthKit SDK headers.

Environmental audio exposure event: this identifier is real

The same SDK header still declares:

HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent API_AVAILABLE(ios(14.0), watchos(7.0), ...)

Apple's docs: https://developer.apple.com/documentation/healthkit/hkcategorytypeidentifier/environmentalaudioexposureevent

On the same device, queryCategorySamples for that identifier failed with unrecognized categoryType (categoryType(forIdentifier:) nil). That looks like a Kingstinct initialization bug, not a missing Apple type. Apple Watch noise notifications write this type; it is read-only.

Please check initializeCategoryType for HKCategoryTypeIdentifierEnvironmentalAudioExposureEvent on current iOS.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions