We are using HealthKit in our app to synchronize step count data.
The data is correctly synced with the Health app, but the step count does not appear in the Fitness app (although workout data does).
Is there anything developers need to do to synchronize step count data with the Fitness app as well?
Health & Fitness
RSS for tagExplore the technical aspects of health and fitness features, including sensor data acquisition, health data processing, and integration with the HealthKit framework.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
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.
Topic:
App & System Services
SubTopic:
Health & Fitness
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
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!
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.
I am creating a watchOS app with XCode, and am experiencing an issue where workouts do not start on watchOS versions 9.6.3 and later.
・App specifications
Start workout when app starts
code (swift)
workout?.startActivity(with: Date())
·phenomenon
In watchOS version 9.6.3 or later, after the Apple Watch runs out of battery or is turned off.
When you turn on your Apple Watch and start using it, even if you start a workout (startActivity),The status may not change to running and the workout may not work.
*Workout always worked on watchOS versions earlier than version 9.6.3.
*The workout will work if you close the app and start the app again.
If anyone has any information, please provide it.
Topic:
App & System Services
SubTopic:
Health & Fitness
My Apple Watch after the beta update is not syncing the activities sometimes with Apple Health.
I just completed a 2.5 km walk, and it showed on Apple Health, yes, but it did not affect my daily goals. This is not the first time this has happened; this is just one of the examples that I'm sharing, other than what has been some problems that I am seeing after the beta update.
Additionally, the camera remote app is not working correctly as I cannot see anything on the watch screen like I used to.
Hi guys,
In WWDC23 session 10016: Build custom workouts with WorkoutKit , the presenters mentioned that a Workout Plan can be exported to a JSON or binary file, and also showed a code snip:
let binaryRepresentation = try myCyclingWorkout.dataRepresentation(in: .compactBinary)
However in the current SDK, the property dataRepresentation can not be exported with a specific format, the base64EncodedString() result is unreadable.
Does anyone know how to export it as a JSON string now? Thanks very much.
I started with the custom workout example from Apple. I was able to load the apps from my mac (xcode) to my iphone. I can run the apps on my iphone. I completed the authorization and reviewed the workout. I then uploaded the workout to the watch and it appeared to work. It never showed up on the watch. I tried restarting the watch and iPhone. I have. a second watch and I tried that. Nothing helped. IPhone 14 with ios 18.2. Watch is Series 6 with watch OS 11.2. I also tried it with the watch on the charger but no change. Workout Kit seems like a good idea, but not if you cannot get it on your watch. It seems very few people are using it as there is little info online.
Topic:
App & System Services
SubTopic:
Health & Fitness
I'm encountering an issue with HealthKit permissions and would appreciate some guidance:
In my app's previous version, I granted write permissions for HKObjectType.workoutType() via the WatchKitExtension. Now, in the upcoming version, I'm trying to request read permissions for both HKObjectType.workoutType() and HKSeriesType.workoutRoute() via the iOS app.
However, after granting access:
The read permissions for Workout and Workout Route don't show up under Settings -> Health -> Data and Access -> [My App].
The Workout Route permission status remains notDetermined, even though I selected "Allow" when prompted.
Interestingly, if I request the same permissions via the WatchKitExtension, everything works as expected, and the issue doesn't occur.
Has anyone experienced a similar issue or have insights into why this might be happening? Could it be related to requesting permissions from the iOS app instead of the WatchKitExtension?
As a user, there are times when I don't wear my sleep tracker to bed, but I nonetheless want to record my sleep times.
Apple Health supports this with the "Add Data" feature, but it's not possible to provide a time zone in the form.
Then as a developer, user-added sleep samples are missing time zone information.
I would expect that the time zone is requested within the Add Data form.
Without this information provided at input time, downstream applications are forced to infer the time zone ourselves, leading to potentially buggy or unintuitive behavior.
I want to use the Apple Healthkit data to recommend personalised insurance. Is this allowed? As I have read in the documentation that the Apple Healthkit data can only be used for fitness and health purposes. Anyone knows what is meant / scope of "fitness and health purposes"? Will personalised insurance as per health data be allowed under this category?
I cannot access my corporate invoice. I don't know why I couldn't reach it. How and where can I reach it?
Topic:
App & System Services
SubTopic:
Health & Fitness
Hi,
Need input on making ICEcard app paid version , requirements. The app is presently live for India and shortly will be for global. This app is for primary health information which is critical in case anyone faces emergency. Will it have any regulatory concerns ?
https://apps.apple.com/in/app/ice-card-app/id6736453602
Topic:
App & System Services
SubTopic:
Health & Fitness
I've searched all the App Intent and AssistantSchemas related documentation and I can't find anything related to workout, do I still need to use SiriKit?
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!
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?
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!
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?
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?