Skip to content

feat: iOS 27 category types (MenopausalState, BleedingAfterMenopause) + generator fix for relocated HKWorkoutActivityType#360

Open
pkuczynski wants to merge 2 commits into
kingstinct:masterfrom
pkuczynski:feat/ios27-menopause-types
Open

feat: iOS 27 category types (MenopausalState, BleedingAfterMenopause) + generator fix for relocated HKWorkoutActivityType#360
pkuczynski wants to merge 2 commits into
kingstinct:masterfrom
pkuczynski:feat/ios27-menopause-types

Conversation

@pkuczynski

Copy link
Copy Markdown

What

iOS 27 adds two reproductive-health category types — HKCategoryTypeIdentifierMenopausalState and HKCategoryTypeIdentifierBleedingAfterMenopause. This regenerates the schema against the iOS 27 SDK to include them.

Regenerating against iOS 27 also surfaced a generator gap: iOS 27 relocated HKWorkoutActivityType out of HKWorkout.h into its own HKWorkoutActivityType.h, and the generator only read HKWorkout.h — so a regen on the iOS 27 SDK silently dropped the entire WorkoutActivityType enum. Fixed the generator to read the relocated header, with a fallback to HKWorkout.h on older SDKs.

Changes

  • Generator (scripts/healthkit-sdk.ts, scripts/generate-healthkit.ts): also read Headers/HKWorkoutActivityType.h when present (optional read; older SDKs keep the enum in HKWorkout.h). Keeps WorkoutActivityType from being dropped when regenerating on iOS 27.
  • Regression guard (scripts/verify-healthkit-sdk.ts): assert WorkoutActivityType is present with its full member set — mirrors the BloodKetones guard added in Restore BloodKetones quantity identifier and harden generator against symbol-graph omissions #354, so this drop can't silently regress on a future SDK bump.
  • Generated (src/generated/healthkit.generated.ts, healthkit-schema.json): regenerated against the iOS 27 SDK — adds the two category identifiers (availability 27.0), the CategoryValueMenopausalState enum (menopause=1, perimenopause=2, none=3), and value-enum associations (MenopausalState → CategoryValueMenopausalState; BleedingAfterMenopause → CategoryValueVaginalBleeding, the shared iOS 18 enum).

Verification

  • Regenerated against the Xcode 27 / iOS 27 SDK with the matching toolchain.
  • bun typecheck && bun lint && bun test pass.
  • Enum ints checked against the SDK header HKCategoryValues.h (HKCategoryValueMenopausalState: Menopause = 1 / Perimenopause = 2 / None = 3).

Related

  • Restore BloodKetones quantity identifier and harden generator against symbol-graph omissions #354 hardens the generator against a different drop (HKQuantityTypeIdentifierBloodKetones, via symbol-graph omission). This is the same class of issue — a header-defined type missing from generated output — for WorkoutActivityType (via header relocation). The two are complementary and touch overlapping files (scripts/generate-healthkit.ts, the generated artifacts), so whichever merges second will need a trivial rebase.

@changeset-bot

changeset-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 583ea6d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@kingstinct/react-native-healthkit Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant