Health & Fitness

RSS for tag

Explore the technical aspects of health and fitness features, including sensor data acquisition, health data processing, and integration with the HealthKit framework.

Health & Fitness Documentation

Posts under Health & Fitness subtopic

Post

Replies

Boosts

Views

Activity

Feature Request – Real-time HealthKit Streaming API for Trusted CarPlay Partners (e.g., Mercedes-Benz ENERGIZING)
Current HealthKit APIs provide access to heart-rate data through queries, but not as a true real-time stream. This limitation prevents systems such as Mercedes-Benz ENERGIZING from dynamically adapting the vehicle environment — including light, sound, seat massage and climate — to the driver’s physiological state. The ENERGIZING Coach developed by Mercedes-Benz uses continuous biometric feedback to enhance comfort, focus and safety by adjusting sensory stimuli based on live pulse data. Garmin wearables can already support this because they offer open Bluetooth Low Energy protocols. The Apple Watch, on the other hand, stores heart-rate data securely in HealthKit and makes it available through delayed write intervals. As a result, the current query mechanisms such as HKAnchoredObjectQuery or HKObserverQuery deliver updates with a latency of several seconds to minutes, which is too slow for the type of sub-second reaction required by driver-assistance or wellness systems. I would like to propose that Apple consider creating a real-time HealthKit streaming entitlement for verified partners such as automotive manufacturers participating in the CarPlay ecosystem. This entitlement could be limited to specific biometric signals like heart rate, heart-rate variability and stress index, and should function only when the user explicitly opts in. The data could travel one way from the iPhone to the vehicle head unit during an active CarPlay session, remain local and encrypted, and never be stored in the cloud. A latency of around half a second would be ideal. Technically, this could follow an asynchronous delegate model similar to HKLiveWorkoutBuilder or a Combine publisher interface adapted for CarPlay Health sessions. A capability like this would extend Apple’s health ecosystem beyond the wrist into the driving environment, allowing cars to respond in real time to the physical state of their drivers. It would strengthen Apple’s commitment to both privacy and safety, while supporting automotive partners that focus on human-centered design. Imagine a driver whose heart rate drops below a vigilance threshold: the Apple Watch detects it instantly, CarPlay transmits the signal securely to the ENERGIZING system, and the vehicle gently adjusts lighting and seat vibration to restore alertness. This kind of integration fits perfectly with Apple’s long-term vision of “Health Everywhere” and would make a measurable contribution to road safety and driver well-being. I would be happy to provide a more detailed use-case document or to collaborate with the Health Technologies and Car Experience teams to outline how this integration could be implemented securely and efficiently.
1
0
168
Oct ’25
Is there any way to access real-time sleep stage data from Apple Watch?
I'm trying to make a watchOS app that uses sleep data to wake users up when they enter lighter sleep stages. Apple has HealthKit, which exposes HKCategoryValueSleepAnalysis to view each stage throughout sleep, but unfortunately, this data is only written after the user wakes up. I did some research and found that the Apple Watch’s sleep classifier is part of Apple’s private system process, and apps can’t access that model directly or as it’s running. So, there’s no way to “record” my own data stream and match it with Apple’s classification during the night. Has anyone found a way to approximate or access live sleep-stage data in another way? I’m thinking of combining CoreMotion (for movement) and heart rate data from a HKWorkoutSession to infer stages myself, but I’m wondering if there’s any Apple-approved or more accurate approach for this. In other words, is there any way to use an Apple Watch to detect sleep stages accurately while the user is still asleep for the purpose of timing an optimal wake-up? Thanks
1
0
213
Oct ’25
HealthKit in React Native + Expo Dev Client: no authorization prompt (and no data)
Hi everyone, I’m building a health app with React Native using Expo Dev Client on a real iPhone. I need to read Apple Health (HealthKit) data, but the authorization sheet never appears—so the app never gets permissions and all queries return nothing. What I’ve already done Enabled HealthKit capability for the iOS target. Added NSHealthShareUsageDescription and NSHealthUpdateUsageDescription to Info.plist. Using a custom dev build (not Expo Go). Tested fresh installs (deleted the app), rebooted device, and checked Settings → Privacy & Security → Health/Motion & Fitness. Tried both packages: react-native-health and @kingstinct/react-native-healthkit. Same behavior: no permission dialog at first use. Ask Is there a known reason why the HealthKit permission sheet would not show on modern iOS when called from a React Native bridge (with Expo Dev Client)? Are there any extra entitlements, signing, or config-plugin steps required beyond HealthKit capability + Info.plist? If you’re successfully fetching Apple Health data from React Native on recent iOS, could you share the exact steps that made the permission sheet appear and data flow (Expo config/plugin used, Xcode capability setup, profile/team settings, build type, bundle ID nuances, any Health app reset steps, etc.)? This would help me and others hitting the same “authorized call but no prompt/no data” issue. Thank you!
1
0
311
Oct ’25
AirPods Pro 3 HRV Data Access Through HealthKit?
Hey everyone I'm working on a health app that's heavily focused on HRV tracking and analysis, and I'm trying to figure out what's actually possible with AirPods Pro 3 from a developer standpoint. The hardware clearly has a much better heart rate sensor than the previous generation, but I'm hitting some walls when it comes to actually accessing the data I need. So here's the situation I'm dealing with: When I query HealthKit for HRV samples, I'm not seeing anything coming from AirPods Pro 3. The device is obviously capable of tracking heart rate continuously during workouts and listening sessions, and from what I've read about the hardware, it should theoretically be able to capture the inter-beat intervals needed for HRV calculation. But either that data isn't being processed on-device, or it's just not being made available through the standard HealthKit data types that third-party apps can access. What I'm really after is either direct HRV metrics (like SDNN, which Apple Watch already provides through HKQuantityTypeIdentifierHeartRateVariabilitySDNN) or even better, access to the raw R-R interval data. With R-R intervals, I could calculate RMSSD, pNN50, and other time-domain and frequency-domain HRV metrics that are super valuable for tracking recovery, autonomic nervous system balance, and stress levels. This would be especially useful since a lot of users wear AirPods during activities when they're not wearing their Apple Watch. Has anyone managed to find a way to pull this data from AirPods Pro 3? Are there any private frameworks or entitlements I should be looking into? Or is this just fundamentally not exposed to developers at the OS level right now? I've gone through the HealthKit documentation pretty thoroughly and haven't found anything that specifically addresses this, but I'm wondering if I'm missing something or if there are any known workarounds. I'm also curious if anyone has heard anything from Apple about future plans to expose this data. It seems like a missed opportunity given how capable the hardware is and how much value developers could provide with access to this physiological data. Would love to hear if anyone else is working on similar features or has insights into the technical limitations here.
1
0
741
Oct ’25
Enabling Cycling Power Read from Garmin Connect To Health
I am working on a cycling fitness app and I want to read the cycling power recorded using my Garmin edge from the Garmin Connect App. Currently the data is not transferred to the Health/Fitness Apps. Ideally it would be good to be able to query the power samples similar to the heart rate samples, but even the average power would suffice, as I could then calculate the Kilojoules.
1
0
189
Nov ’25
Can a 3rd party app use WorkoutKit to store interval details?
I am the developer of a workout app that allows users to create interval programs (e.g. Warm Up, Fast, Cool Down). It is possible for me to store the data for the intervals along with the workout in the Health system by using WorkoutKit (or any other method)? My aim is to make it so that the Fitness app shows the interval details when users view workouts created by my app. Thanks in advance.
1
1
180
Nov ’25
Is it possible to distinguish real vs manually added running data in HealthKit?
I am developing an iOS application that utilizes running workout data from the iOS Health app / Fitness app via HealthKit, with explicit user permission. Before finalizing the app design, I would like to clarify several technical aspects related to data reliability, manual entry, record modification, and GPS route availability in HealthKit. My questions are as follows: 1. Identifying manually added (non-physical) running workouts When a running workout is created in the Health app without actual physical movement (for example, a workout manually added by the user), is there any metadata, flag, or key in HealthKit that allows developers to distinguish these records from workouts generated through actual motion tracking (iPhone or Apple Watch)? 2. Editing existing running workout records Is it possible for users, or for third-party apps with HealthKit write permission, to edit an existing running workout (e.g., distance, duration, calories) after it has been saved? • If edits are allowed, are the original values preserved in any way, or are they fully overwritten? 3. Detecting modified workout records If a running workout (whether originally auto-recorded or manually created) has been edited after creation, is there any identifier, metadata field, source revision, or versioning mechanism in HealthKit that allows developers to detect that the workout has been modified? 4. Access to GPS route / running path data For outdoor running workouts recorded with location services enabled: • Does HealthKit provide access to GPS route data (running paths / location traces) associated with a workout? • Is this route data accessible to third-party apps with user permission? • Is route data available only for workouts recorded on Apple Watch, or also for iPhone-only recordings? • Is there a way to determine programmatically whether a running workout includes valid GPS route data? The overall goal is to understand whether, when building an app that relies on HealthKit running data, it is technically possible to differentiate motion-based workouts from manually added or edited records, and to assess the availability of route information for outdoor runs. Any clarification or references to official documentation would be greatly appreciated. Thank you
1
0
203
Dec ’25
Abnormal Background Delivery Frequency of HealthKit on Specific watchOS Devices
1/ Issue Summary In our application, we use HKObserverQuery together with:HKHealthStore.enableBackgroundDelivery(for:frequency: .immediate) to enable HealthKit Background Delivery, allowing the system to wake our App Extension in the background to process health data updates. Under the same app build, identical HealthKit permission configuration, and the same watchOS version, we have observed significant differences in background delivery frequency across different devices. Specifically, on certain devices (e.g. Apple Watch Series 10, watchOS 26.2.1), the background delivery frequency is significantly reduced, behaving as if it is capped at approximately once per hour. On other control devices, under the same configuration, background delivery is triggered much more frequently and consistently, at approximately every 8–16 minutes. This behavior is consistently reproducible on the affected devices. **We would like to understand whether there are any officially recommended implementation patterns, best practices, or device-/system-level considerations when using HKObserverQuery and Background Delivery, in order to achieve more consistent and predictable background update behavior across different devices running the same system version. ** 2/ Detailed Device Comparison We conducted internal comparison testing across multiple devices with the following results: Device A (Affected / Abnormal) Model: Apple Watch Series 10 (46mm) OS: watchOS 26.2.1 Serial (partial): C*HY Background Delivery Frequency: ~ once every 60 minutes (significantly lower than expected) Device B (Normal) Model: Apple Watch Series 10 (42mm) OS: watchOS 26.2.1 Serial (partial): G*4R Background Delivery Frequency: ~ every 8–16 minutes Device C (Normal) Model: Apple Watch Series 8 (41mm) OS: watchOS 26.3 Serial (partial): C*J6 Background Delivery Frequency: ~ every 8–16 minutes Device D (Normal) Model: Apple Watch Series 5 (41mm) OS: watchOS 10.6.1 Serial (partial): G*TQ Background Delivery Frequency: ~ every 8–16 minutes All devices share the following conditions: HealthKit permissions: Full read/write permissions granted Background App Refresh: Enabled System state: Low Power Mode, Do Not Disturb, and all Focus modes disabled App build: Identical app build installed on all devices HealthKit configuration: Same data types and same frequency parameter used in enableBackgroundDelivery Implementation: Identical HKObserverQuery implementation logic 3/ Abnormal Behavior Observed On the affected device(s), we observe that: HealthKit background delivery appears to be heavily coalesced or throttled The system rarely attempts to wake the App Extension Behavior is clearly inconsistent with other devices using the same configuration The behavior does not match our expectations for HealthKit Background Delivery with .immediate frequency 4/ Troubleshooting Already Performed We have already attempted the following on the affected device(s): Restarted both Apple Watch and paired iPhone Re-paired the Apple Watch Uninstalled and reinstalled the app Revoked and re-granted HealthKit permissions Confirmed that Low Power Mode, Do Not Disturb, and Focus modes are all disabled The issue remains consistently reproducible. 5/ Assistance Requested We would appreciate guidance on: Whether there are any officially recommended implementation patterns, tuning options, or best practices for using HKObserverQuery and HealthKit Background Delivery Whether there are any known device-level or system-level factors that may cause significantly different background delivery behavior on different devices running the same watchOS version How to best achieve consistent and predictable background update delivery behavior across devices for apps that rely on this mechanism 6/ Additional Information We can provide sysdiagnose logs from both affected and unaffected devices for comparison We can also provide a minimal reproducible sample project if needed
1
0
250
3w
Having trouble getting Apple Fitness move ring to be updated without Apple Watch
Some users have switched to wearing smart rings instead of an Apple Watch, but they still want their rings to close throughout the day in Apple Fitness to keep their streaks going. I've noticed that the 3rd party smart ring apps do not affect the progress of the exercise and move rings unless the user puts on their Apple Watch and syncs with there iPhone throughout the day. Is there a way to make the progress rings update throughout the day without having to connect an Apple Watch periodically?
1
0
60
4d
Health app fails to ingest FHIR Clinical Records on iOS 26.2 (healthappd crash) – Works on iOS 18.1
Area Health & Fitness → HealthKit → Health Records (FHIR Ingestion) Summary On devices running iOS 26.2, FHIR Clinical Records successfully connect and validate, but no data (Procedure, DiagnosticReport, Observation, etc.) is ingested into the Health app. The same FHIR server and patient connection works correctly on iOS 18.1, where all data syncs and displays as expected. On iOS 26.2: FHIR validation passes in Health Records “Last Download Date” updates Patient data is visible in connection No clinical data appears in Health app No apps are listed under Privacy → Health Device shows “No Data Found” Crash logs show healthappd terminating during ingestion This appears to be a regression in the HealthPlatform / HealthKit ingestion pipeline in iOS 26. Steps to Reproduce Use an iPhone running iOS 26.2 Open Health app Add Health Record from FHIR server Authenticate successfully Confirm FHIR validation screen shows all resources as “Passed” Wait for sync to complete Expected Result Procedures, DiagnosticReports, Observations, etc. should appear in Health app Data should be written to HealthKit Apps should appear under Settings → Privacy & Security → Health Actual Result No data appears in Health app No Procedures, DiagnosticReports, Observations, etc. Apps section under Health permissions shows “None” Device shows “No Data Found” Last Download Date updates correctly Validation Results (All Passed) The following FHIR resources show “Passed” in Health validation: AllergyIntolerance Condition DiagnosticReport DiagnosticReport-ClinicalNotes-Cardiology DiagnosticReport-ClinicalNotes-Pathology DiagnosticReport-ClinicalNotes-Radiology DocumentReference-ClinicalNotes Immunization MedicationRequest Observation-Labs Observation-VitalSigns Patient Procedure Server responses are correct and return expected data when tested via Postman. Crash Log Details Crash occurs in process: healthappd Frameworks involved: HealthPlatform.framework HealthKit Combine Exception: EXC_BAD_ACCESS SIGKILL EXC_ARM_PAC_FAIL Thread: com.apple.HealthKit.HKHealthStoreImplementation.client Stack trace includes: objc_msgSend HKSharedSummary DictionaryStorage.deinit swift_release_dealloc objc_destructInstance Publishers.MergeMany Future.init This indicates the ingestion pipeline crashes before data is written to HealthKit. Comparison Across OS Versions iOS Version Result iOS 18.1 Data syncs correctly iOS 26.2 No data syncs, healthappd crash Same: Same FHIR server Same patient Same authentication Same device model Same iCloud settings Additional Notes OAuth flow succeeds FHIR validation passes Server responses are correct Postman returns correct JSON No TLS errors No permission errors Issue only occurs on iOS 26+ This appears to be a regression in the FHIR ingestion engine introduced after iOS 18.1.
1
0
40
2d
Health app fails to ingest FHIR Clinical Records on iOS 26.2 (healthappd crash) – Works on iOS 18.1
Area Health & Fitness → HealthKit → Health Records (FHIR Ingestion) Summary On devices running iOS 26.2, FHIR Clinical Records successfully connect and validate, but no data (Procedure, DiagnosticReport, Observation, etc.) is ingested into the Health app. The same FHIR server and patient connection works correctly on iOS 18.1, where all data syncs and displays as expected. On iOS 26.2: FHIR validation passes in Health Records “Last Download Date” updates Patient data is visible in connection No clinical data appears in Health app No apps are listed under Privacy → Health Device shows “No Data Found” Crash logs show healthappd terminating during ingestion This appears to be a regression in the HealthPlatform / HealthKit ingestion pipeline in iOS 26. Steps to Reproduce Use an iPhone running iOS 26.2 Open Health app Add Health Record from FHIR server Authenticate successfully Confirm FHIR validation screen shows all resources as “Passed” Wait for sync to complete Expected Result Procedures, DiagnosticReports, Observations, etc. should appear in Health app Data should be written to HealthKit Apps should appear under Settings → Privacy & Security → Health Actual Result No data appears in Health app No Procedures, DiagnosticReports, Observations, etc. Apps section under Health permissions shows “None” Device shows “No Data Found” Last Download Date updates correctly Validation Results (All Passed) The following FHIR resources show “Passed” in Health validation: AllergyIntolerance Condition DiagnosticReport DiagnosticReport-ClinicalNotes-Cardiology DiagnosticReport-ClinicalNotes-Pathology DiagnosticReport-ClinicalNotes-Radiology DocumentReference-ClinicalNotes Immunization MedicationRequest Observation-Labs Observation-VitalSigns Patient Procedure Server responses are correct and return expected data when tested via Postman. Crash Log Details Crash occurs in process: healthappd Frameworks involved: HealthPlatform.framework HealthKit Combine Exception: EXC_BAD_ACCESS SIGKILL EXC_ARM_PAC_FAIL Thread: com.apple.HealthKit.HKHealthStoreImplementation.client Stack trace includes: objc_msgSend HKSharedSummary DictionaryStorage.deinit swift_release_dealloc objc_destructInstance Publishers.MergeMany Future.init This indicates the ingestion pipeline crashes before data is written to HealthKit. Comparison Across OS Versions iOS Version Result iOS 18.1 Data syncs correctly iOS 26.2 No data syncs, healthappd crash Same: Same FHIR server Same patient Same authentication Same device model Same iCloud settings Additional Notes OAuth flow succeeds FHIR validation passes Server responses are correct Postman returns correct JSON No TLS errors No permission errors Issue only occurs on iOS 26+ This appears to be a regression in the FHIR ingestion engine introduced after iOS 18.1.
1
0
39
2d
Combining Screen Time Usage with HealthKit Data in a Chart
Hello Apple Developer Community, I’m working on creating a chart that combines Screen Time Usage data with Workout Time from HealthKit. I’ve successfully implemented a DeviceActivityReportExtension to fetch Screen Time data and draw a chart. I’m also able to read HealthKit data from the main app. However, I’m having trouble integrating the HealthKit data into the View generated by the DeviceActivityReportExtension. I’ve attempted to read HealthKit data directly from the extension , but this doesn’t seem to work, likely due to HealthKit access restrictions in extensions. I also tied using a shared object to pass HealthKit data to the extension, but unfortunately this didn’t seem to work as expected. I’d greatly appreciate any suggestions on how to successfully integrate HealthKit data into the extension-generated View. Has anyone dealt with a similar challenge or found a workaround for this? Thanks in advance for your help!
0
0
89
Mar ’25
Data Processing Addendum
For an app that plan to integrate Apple HealthKit to allow app users to upload and download their health data, where can I locate the Data Processing Addendum that specifies who the data controller and processor will be, and how such health data will be used or distributed?
0
0
65
Apr ’25
healthStore.workoutSessionMirroringStartHandler never called
I'm trying to run this example project: https://developer.apple.com/documentation/HealthKit/building-a-multidevice-workout-app When I run it on my device (iPhone 16 Pro and Apple Watch Ultra 2) I get this error: -[SPRemoteInterface _appRecoverAnyExtendedRuntimeSession:]_block_invoke:4350: Got no sessions back from -[CSLSSessionService existingRunningSessions:] or -[CSLSSessionService existingScheduledSessions:] after receiving a PUICInitializeSessionServiceAction I start the workout from my phone, which successfully starts the workout on the watch. But this callback is never triggered on the phone: healthStore.workoutSessionMirroringStartHandler { // not happening } This makes it difficult to learn the mirroring workout technique. I'm using Xcode 16.3 and Mac OS 15.4.1. Any help appreciated!
0
2
139
Apr ’25
iOS companion app with no Watch connected
Based on Cooordinate with the companion app in this article by Apple https://developer.apple.com/documentation/healthkit/running-workout-sessions if a workout were to be started on the iPhone companion app but with no Watch available, given HKLiveWorkoutBuilder not available in iOS, does the iPhone app need to implement it's own workout tracking such as a timer for counting the elapsed time and location updates for distance and GPS tracking? If so in an instance where a paired Apple Watch were to exist and the workout is continued in the Watch app should the iPhone companion app stop this custom workout tracking and revert to the mirrored workout from the Watch to ensure accurate and synchronised data between the apps?
0
0
146
May ’25
Healthkit - Oura Sync Issue
We are working on the health related application and use apple health kit to sync the data from different devices like watches or ring. We are targeting oura ring to get sleep and other parameters data. We are able to sync the data from oura for all other parameters (like pulse, respiratory rate, blood pressure, etc..) other than sleep. Surprisingly, sleep data that comes through other devices is syncing as expected from the health kit. We are even getting the data which is added manually in health kit. The only sleep data not syncing is from oura. Can we get a document or any kind of help to sync the data from oura in to our application using health kit?
0
0
98
May ’25
watchOS workout app not reachable from iOS (sometimes)
In general my workout app is reachable from the iPhone when running a workout, even if in the background. However if the watch app restarts (due to crash or being closed via the dock) via handleActiveWorkoutRecovery then it is only reachable when in the foreground, even though a workout is running. Is this expected / desired behaviour? Is the app given a tighter sandbox (having it's "background privileges" reduced) because of the earlier crash? This behaviour occasionally happens without a crash (or being closed via the dock) - all of a sudden it is no longer reachable via the iPhone. It feels like the app is being "sandboxed" like in #1 but there is no crash or any other kind of log indicating any issue. Generally the only remedy is to stop the workout and restart the app. My question is - is this expected? Is there some condition that causes the watchOS to sandbox the app? Or is this a Watch Connectivity bug?
0
0
140
May ’25