Hello,
I am building a workout app that has an option to add segments to differentiate different stages of the training session. Segments are added the following way:
func saveSegment(eventType: HKWorkoutEventType, startDate: Date, endDate: Date, inSeg: Int) async throws {
let dateInterval = DateInterval(start: startDate, end: endDate)
let event = HKWorkoutEvent(type: eventType, dateInterval: dateInterval, metadata: metadata)
try await builder?.addWorkoutEvents([event])
}
Inside Health -> Workouts -> Show All Data, the segments appear, but in Fitness app there are no segments. The workout is .paddleSports. I thought that maybe the workout type was the problem, but when I start the sessions from the native workout app, segments are added and shown in the Fitness app:
In other posts I saw suggested to add an event as .marker instead of .segment, but the result is the same, it does not appear.
Is there something I am doing wrong? How can I show the segments into the Fitness app?
Another question, I would like to add stroke rate and stroke count to my paddling session, is there a way to add it? Paddle Sports workout was recently introduced and it would be great to have the option to add those values.
Thank you in advance.
Inaki
Use HealthKit to enable your iOS and watchOS apps to work with the Apple Health app.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi everyone,
while testing HKWorkoutSession with HKLiveWorkoutBuilder on iOS 26 Beta (cycling workout), I noticed the following behavior:
– Starting a cycling HKWorkoutSession automatically connects to my Bluetooth heart rate monitor and records HR into HealthKit ✅
– However, my Bluetooth cycling power meter and cadence sensor (standard BLE Cycling Power & CSC services) are not connected automatically, and no data is recorded into HealthKit ❌
On Apple Watch, when starting a cycling workout, these sensors do connect automatically and their data is written to HealthKit — which is exactly what I would expect on iOS as well.
Question:
Is this by design, or is support for power and cadence sensors planned for iOS in the same way as on watchOS?
Or do we, as developers, need to implement the BLE Cycling Power and CSC profiles ourselves (via CoreBluetooth) if we want these metrics?
Environment:
– iOS 26 Beta
– HKWorkoutSession & HKLiveWorkoutBuilder (cycling)
– Bluetooth HRM connects automatically
– BLE power & cadence sensors do not
This feature would make it much easier to develop cycling apps with full HealthKit integration, and also create a more consistent user experience compared to watchOS.
Thanks for any insights!
Topic:
App & System Services
SubTopic:
Hardware
Tags:
Health and Fitness
HealthKit
Core Bluetooth
WorkoutKit
New in iOS 26 and WatchOS 26 is a Sleep Score calculation for users based on Duration, Bedtime and Interruptions.
Unfortunately I can't find any APIs for developers to tap into this metric. Yes, in theory it's all created off the same Sleep Analysis data already available with HealthKit but that makes it very hard to recreate in our apps. If the numbers don't match up exactly, users will understandably complain.
Can anyone confirm that this is the case and I've not missed a Sleep Score API? I'll then file feedback.
Hopefully this doesn't go the way of Heart Rate Zones where the Apple Watch iPhone app has generated them for years and provided no way for third party apps to access these values (yes many feedbacks provided previously).
Hi all,
I'm developing fitness app and I use healthkit to track user's "STEPS" count from their iphone devices. I have been receiving this rejection and can't seem to get past this:
Guideline 2.5.1 - Performance - Software Requirements
The app uses the HealthKit or CareKit APIs but does not clearly identify the HealthKit and CareKit functionality in the app's user interface.
Apps using these APIs should be clearly indicated to provide transparency and valuable information to users.
Next Steps
To resolve this issue, it would appropriate to clearly identify the HealthKit and CareKit functionality in the app's user interface.
Resources
Learn more about software requirements in guideline 2.5.1.
I have modified my app: adding user permission prompt, adding healthkit notification, adding healthkit indicator in the UI, adding healthkit information in the onboarding process.
I keep getting the same message. When I asked the reviewer what else could be done to satisfy the requirement, I only get boiler plate message above. Anyone know what they really looking for?
Any insights is appreciated. Thanks!
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
Health and Fitness
HealthKit
CareKit
I want to insert the medication data which is available from ios 26 from my app to apple health kit. I have tried to get the permission to read and write data but app got crashed while I tried to request that permission. Does apple allow to insert the medication data to apple health kit likewise we are able to add other health and fitness data or not?
let healthStore = HKHealthStore()
@available(iOS 26.0, *)
@objc func requestAuthorization(_ resolve: @escaping RCTPromiseResolveBlock,
rejecter reject: @escaping RCTPromiseRejectBlock) {
guard HKHealthStore.isHealthDataAvailable() else {
print("not available ")
return
}
let doseType = HKObjectType.medicationDoseEventType()
let medType = HKObjectType.userAnnotatedMedicationType()
healthStore.requestAuthorization(toShare: [doseType], read: [doseType]) { success, error in
if let err = error { reject("auth_error", err.localizedDescription, err); return }
self.healthStore.requestPerObjectReadAuthorization(for: medType, predicate: nil) { s, e in
if let err2 = e { reject("per_obj_auth", err2.localizedDescription, err2); return }
resolve(["ok": success && s])
}
}
}
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?
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.
Hi everyone,
we’re developing an app that lets users export selected bike rides to the HealthKit ecosystem. We created our app icon using the Apple Icon Composer and referenced the composer file in Xcode. Everything works fine, except that the logo doesn’t appear correctly in the Fitness app.
Has anyone experienced this issue or knows how to fix it?
Topic:
App & System Services
SubTopic:
Health & Fitness
Tags:
Health and Fitness
HealthKit
Icon Composer
Hello,
I have enabled HealthKit background delivery for sleep analysis samples:
private func setupSleepDataBackgroundDelivery() {
if let sleepType = HKObjectType.categoryType(forIdentifier: HKCategoryTypeIdentifier.sleepAnalysis) {
healthStore.enableBackgroundDelivery(for: sleepType, frequency: .immediate) { (success, error) in
}
}
}
In general, this function works.
But I would love to know what the limitations / expected delivery delay for frequency: .immediate is.
The documentation is only very vague about this and specifies that some sample types such as steps are only delivered once per hour.
But how about sleep data? Is this expected to be delivered immediately once available on iPhone?
Thanks a lot for your help!
I am very happy to see that HealthKit with OS26 is bringing HKLiveWorkoutDataSource to iOS and iPadOS. I have been replicating a similar type for the last several years for users that only have an iPhone.
I did notice that the data types that the different platform data sources collect automatically is different. That makes sense if you think exclusively about what the device can actually capture. Bluetooth HRM is the only Bluetooth SIG profile that is out-of-the-box supported for Apple Health on iOS and iPadOS (right?). Whereas watchOS 10 got all of the cycling sensors (woohoo!).
It would be great if the types to collect were the same across platforms even if the device couldn't collect the data now, because then in the future when / if new sensor support is added, it will be transparent to developers. Fantastic. Easier life as an indie / third party developer. At least that is the idea.
And yes, I know I can also write Core Bluetooth code and roll my own SIG implementation for the cycling profiles, but Apple already has this code in one os, 'just copy it, it will be easy'. I know that isn't the reality especially against the new ASK framework, but one can hope and dream right? Imagine how many more apps would contribute that data if it was supported out of the box. An alternative, GitHub is a great place for Apple to share their Core Bluetooth implementation of the SIG profiles :). Just another thought.
Here are some feedbacks related to this:
FB17931751 - HealthKit: Add built-in support for cycling sensors on iOS and iPadOS - copy paste the code from watchOS. It will be easy they said (June 2025)
FB12323089 - CoreBluetooth / Health / Bluetooth Settings: Add support for cycling sensors announced in watchOS 10 to iOS and iPadOS 17 (June 2023)
FB14311218 - HealthKit: Expected outdoor cycling to include .cyclingSpeed quantity type as a default HKLiveWorkoutDataSource type to collect (July 2024)
FB14978701 - Bluetooth / HealthKit / Fitness: Expose information about the user specified for Apple Watch paired Cycing Speed Sensor like isConnected and wheelCircumference values (August 2024)
FB18402258 - HealthKit: HKLiveWorkoutDataSource should collect same types on iOS and watchOS even if device cannot produce data today (June 2025)
FB14236080 - Developer Documentation / HealthKit: Update documentation for HKLiveWorkoutDataSource typesToCollect for which sample types are automatically collected by watchOS 10 and 11 (July 2024)
Tangentially related:
FB10281304 - HealthKit: Add HKActivityTypes canoeBikeRun and kayakBikeRun (June 2022)
FB10281349 - HealthKit: Add HKActivityType walkCanoeWalk and walkKayakWalk (June 2022)
FB7807993 - Add HKQuantityTypeIdentifier.paddleDistance for canoeing, kayaking, etc type workouts (June 2020)
FB12508654 - HealthKit / Settings / Bluetooth / Workouts: Cycling sensor support doesn't allow for 'bike selection' in use case of multiple bikes and multiple sensors (borrow a bike to ride together) - production usability issue (July 2023)
Topic:
App & System Services
SubTopic:
Health & Fitness
Tags:
Health and Fitness
HealthKit
Core Bluetooth
AccessorySetupKit
Hello,
I’m building a health-related app for both watchOS and iOS, which needs to monitor certain health data (e.g., heart rate, active energy).
Before updating to watchOS 26, the queries worked reliably without any issues. However, after adapting to watchOS 26, some users have reported that health data updates stop being delivered.
What I’ve observed:
HKObserverQuery with enableBackgroundDelivery is set up normally.
On WatchOS 26, the query sometimes stops delivering updates entirely after a certain point, and once an update is missed, it may stop delivering further updates completely.
Restarting the Apple Watch temporarily restores delivery, but the problem reoccurs after some time.
This makes background health data monitoring unreliable for my app.
Here’s a simplified version of the code we are using:
guard let heartType = HKObjectType.quantityType(forIdentifier: .heartRate) else { return }
let query = HKObserverQuery(sampleType: heartType, predicate: nil) { query, completionHandler, error in
if let error = error {
logEvent("Observer error: \(error.localizedDescription)")
return
}
logEvent("Heart rate changed")
MyNotificationManager.shared.sendNotification() // Send a local notification
completionHandler()
}
healthStore.execute(query)
healthStore.enableBackgroundDelivery(for: heartType, frequency: .hourly) { success, error in
if success {
logEvent("Background heart rate delivery enabled")
} else {
logEvent("Failed to enable background heart rate delivery: \(error?.localizedDescription ?? "Unknown error")")
}
}
Could you please clarify:
Is this a known issue with HKObserverQuery and enableBackgroundDelivery on watchOS 26?
Are there any recommended workarounds or best practices to ensure continuous background delivery of health data?
Thank you in advance for your help.
Topic:
App & System Services
SubTopic:
Health & Fitness
Tags:
Health and Fitness
watchOS
HealthKit
Observation