New advertisers: 50% off your first month with code FIRSTMONTHSee slots

Swift HealthKit guide for reading, writing, querying, and recording Apple Health data with async descriptors.

skills.sh installs
4.1K
GitHub stars
1.3K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers HKHealthStore authorization, sample and statistics queries, collection queries for charts, and HKQuantitySample saves
  • Includes workout sessions with HKWorkoutSession and HKLiveWorkoutBuilder, plus background delivery setup and HKUnit reference
  • Enforces a rule to request only needed types and to treat a successful save as the write-success gate
  • Targets Swift 6.3 and iOS 26+ for apps integrating Apple Health metrics, charts, or recorded workouts

Install

$ npx -y skills add dpearson2699/swift-ios-skills --skill healthkit -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

HealthKit

Read and write health and fitness data from the Apple Health store. Covers authorization, queries, writing samples, background delivery, and workout sessions. Targets Swift 6.3 / iOS 26+.

Contents

Setup and Availability

Project Configuration

  1. Enable the HealthKit capability in Xcode (adds the entitlement)
  2. Add NSHealthShareUsageDescription (read) and NSHealthUpdateUsageDescription (write) to Info.plist
  3. For background delivery, enable the "Background Delivery" sub-capability

Availability Check

Details

Repository
github.com/dpearson2699/swift-ios-skills
Category
Mobile Apps
First seen
Apr 16, 2026

More from dpearson2699/swift-ios-skills

All 94

Similar to Healthkit

More Mobile Apps