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

No Response for Family Controls Distribution Entitlement Request for 2 Weeks
Hello, I have submitted multiple requests for the Family Controls Distribution Entitlement through this form: https://developer.apple.com/contact/request/family-controls-distribution After submitting my requests, I waited for about 1 week but did not receive any response. Since I heard nothing, I contacted Apple Developer Support by email. After that, I finally received a response from an advisor asking for additional information, including my follow-up number. I replied with all the requested information immediately, but it has now been 5 more days and I still have not received any further response. In total, I have been waiting for about 2 weeks for this entitlement request. My app is a Screen Time control / digital wellbeing application that helps users reduce screen time through exercise-based challenges and healthy habits. My app uses the FamilyControls, ManagedSettings, and DeviceActivity frameworks and requires the Distribution Entitlement for App Store release. Here are my details: Case Number: 102866460896 Request Type: Family Controls Distribution Entitlement I understand the team may be busy, but I would appreciate any help checking the status of my request or escalating it if possible. Thank you very much.
2
0
216
3w
watchOS Motion & Fitness authorization kills foreground iOS companion app with SIGKILL 9
We are seeing a reproducible process termination involving a companion watchOS app and its paired iOS companion app when Motion & Fitness authorization is requested from the watchOS app. Context: iOS app bundle identifier: com.alpha.golfbird watchOS app bundle identifier: com.alpha.golfbird.watchkitapp The watchOS app has WKCompanionAppBundleIdentifier set to the iOS app bundle identifier. Both the iOS app and the watchOS app include NSMotionUsageDescription in their Info.plist files. The watchOS app uses CMAltimeter to read barometric altitude changes for slope-adjusted golf distance calculations. The authorization flow checks CMAltimeter.authorizationStatus(). If the status is notDetermined, it uses CMMotionActivityManager.queryActivityStarting(from:to:to:) before starting CMAltimeter updates, following the known iOS 17.4+ Core Motion authorization behavior. Observed behavior: Install or launch the watchOS companion app for the first time. Open the paired iOS companion app and keep it in the foreground. In the watchOS app, enter the feature that starts the slope/altimeter flow. watchOS shows the Motion & Fitness permission prompt. After the user grants permission, the watchOS app continues normally and CMAltimeter authorization succeeds. At approximately the same time, the foreground iOS app process is terminated. In debug builds, Xcode reports: Debug session ended with code 9: Terminated due to signal 9 In TestFlight builds, users observe that the iOS app closes and relaunches. We do not get a normal iOS crash stack trace for the iOS app, which makes this look like a system termination rather than an application exception. Expected behavior: Granting Motion & Fitness authorization from the watchOS companion app should not terminate the foreground paired iOS companion app, or there should be documented lifecycle behavior and a recommended state-restoration strategy for this case. Question: Is it expected system behavior for a watchOS companion app's Motion & Fitness / Core Motion authorization change to terminate the paired foreground iOS companion app process? If it is expected, is there any documented notification, lifecycle callback, or recommended workaround so the iOS app can preserve and restore user state without looking like a crash? If it is not expected, should this be filed as a Core Motion / watchOS / WatchKit privacy authorization bug via Feedback Assistant, and what diagnostic logs would Apple recommend attaching?
1
0
100
2w
iOS app will not auto-sleep
Hello, I am working on a iOS app. This is my first big project in SwiftUI which it is going well besides I can not get my phone to auto-sleep/auto-lock when I am in the app. I am testing the app on my phone through xcode. As I am checking my energy report on idle it is saying Low and is almost to the very bottom, and my memory is idling at 90MB~115MB which seems very low. Now If I just leave the app it works right away even if I do not clear the app. I am wondering if anyone has any ideas on how to help me with this issue. I am using HealthKit, a Timer and the camera. I am making a workout app to give some information. I can also give more info if needed I will appreciate any help or ideas. I have tried to use AI to see if it can find any issues and it said that it didn't see anything wrong with my code that will cause it not to sleep now that is AI and it isn't perfect so I would appreciate any help.
1
0
84
2w
Detecting External Heart Rate Monitor Availability
I've noticed that the Fitness app on the iPhone can rapidly detect the presence of an Apple Watch or External Heart Rate Monitor (e.g., AirPods Pro 3) so that it can adjust the availability of certain exercise types. Is this done through an API that is public? Can third party fitness apps access similar functionality so users can be pre-alerted to the availability of workout types that require a heart rate sensor of some sort?
1
0
136
1w
Indoor workout location
In the Fitness app under iOS 26, each workout location is displayed on a small map. For workouts with routes, I can already successfully read out the route and thus also determine the starting point. So that works. For indoor workouts such as yoga or indoor rowing, the exact location is also displayed in the Fitness app. I would now also like to read out this location for these indoor workouts in my app. Does anyone know how to do this?
1
0
189
1w
HealthKit Blood Pressure authorization broken on iOS 26.5 RC
Hello, I'm experiencing a bug on iOS 26.5 RC1/RC2 where the Blood Pressure option is silently excluded from the HealthKit permission dialog (when requesting HKQuantityTypeIdentifierBloodPressureSystolic and HKQuantityTypeIdentifierBloodPressureDiastolic). This does not reproduce on iOS 26.4.2 or earlier. What happens: When BP types are requested alone, a blank white modal slides up and immediately dismisses — no permission UI is shown. When BP is requested alongside other types, a normal dialog appears for those other types, but Blood Pressure is simply absent from the list. The completion handler returns success = YES, error = nil in both cases, but BP permission is never granted. The result: Settings → Privacy & Security → Health → [app] shows Blood Pressure as requested but not granted getRequestStatusForAuthorizationToShareTypes for the BP types keeps returning ShouldRequest indefinitely HealthKit queries for BP samples return no data Workaround: Manually toggling Blood Pressure to ON in Settings → Privacy & Security → Health → [app name] fixes everything - queries work, notifications fire, and getRequestStatusForAuthorizationToShareTypes correctly returns HKAuthorizationRequestStatusUnnecessary. Environment: Confirmed broken: iOS 26.5 RC1 (23F75) and RC2 (23F77), iPhone 11; iOS 26.5 RC1 (23F73), simulator Confirmed working: iOS 26.4.2 (device), iOS 26.4.1 (simulator) Feedback filed as FB22735935.
10
10
1.6k
1w
HKWorkoutBuilder.finishWorkout() fails silently (nil workout, nil error) when device is locked (iOS 26.4+)
Hello everyone, We are encountering a critical regression introduced in iOS 26.4 that results in permanent workout data loss for users. When invoking HKWorkoutBuilder.finishWorkout(completion:) while the iOS device is locked, the save operation fails completely. However, it fails silently: the completion handler executes but returns both a nil workout and a nil error. Expected Behavior: Before iOS 26.4 finishWorkout resulted in a workout id, and correctly stored the workout data in HealthKit. According to HealthKit data protection documentation, saving data when the device is locked should either succeed (writing to a temporary journal file to be merged upon unlock) or explicitly throw an error such as HKError.Code.errorDatabaseInaccessible. Actual Behavior: Because the framework returns nil for both the object and the error, the application has no way to detect that the save failed. We cannot implement a retry mechanism or queue the save, resulting in silent data loss. Steps to Reproduce: We have built a Minimal Reproducible Example (MRE) that reliably triggers this: Initialize an HKWorkoutBuilder and call beginCollection(withStart:) followed by endCollection(withEnd:). Wrap the finishWorkout call in a short 5-second asynchronous delay, protected by a UIBackgroundTask to prevent app suspension. Lock the physical device during this 5-second window. The finishWorkout completion handler will execute while the device is locked, returning workout == nil and error == nil. Existing Reports: We have filed this via Feedback Assistant (a month ago) and opened a TSI (a week ago), providing the MRE project and a sysdiagnose captured at the time of failure: Feedback ID: FB22396180 TSI Case-ID: 19755043 As we have not yet received a response or a suggested workaround through these official channels, we are reaching out to the community. Has anyone else encountered this silent failure with HKWorkoutBuilder recently? Any insights or escalation help would be greatly appreciated.
4
1
344
1w
Unable to invalidate interval: no data source available error when fetching steps using HKStatisticsCollectionQuery
While attempting to read a user’s daily step history spanning backward to the last 7 days, a small but consistent subset of users encounter Error Code 3 with the underlying error description: Error Code 3 "Unable to invalidate interval: no data source available." When this error occurs, we are entirely unable to read their step history. We have received ~10 direct user reports of this within the last couple of weeks.
12
2
788
1w
How long does Apple Watch keep HealthKit data?
I would like to create an Apple Watch only app that queries data such as blood oxygenation, heart varibility, number of steps, energy consumed, and other data of a similar nature recorded over the past month and performs calculations on them. I read from the HealthKit documentation that Apple Watch synchronizes data with iPhone and periodically deletes older data, and that I can get the date from which the data is available with earliestPermittedSampleDate(). Is there a risk that in general, by making queries to retrieve data up to a month old, the data will no longer be available? I need the app to work properly without needing an iPhone.
5
1
2.4k
6d
When will the bundle identifier parameter change in Apple Health?
Recently, I am developing an app based on user health data tracking, which involves a scenario where a user wears multiple electronic watches. In this case, I need to distinguish the data sources to prevent the data from not being correctly distinguished when the user wears multiple watches. Currently, bundle identifier seems to be a great choice for me, but after trying to read the materials, it seems that after unbinding, I rebind it. Alternatively, rebinding on another phone would cause this parameter to change. Do you have any better ideas?
0
0
11
2d
Health permissions problem with watchOS 10.6.2
In the last few weeks 5 users have reported my workout watch app being unable to read health data despite the permissions being enabled in the iPhone Settings app. This has been a common complaint over the years and is usually fixed by disabling the permissions; rebooting both devices; and then enabling them again. This usually nudges iOS into sending the permissions to watchOS. However that procedure doesn't work for these users, all of whom are using watchOS 10.6.2. They are using various versions of iOS 18 or 26 so it seems to be a problem with that version of watchOS, which users are usually limited to because their hardware won't support anything more up to date. It seems that unpairing and re-pairing the watch can fix the problem but not always. I looked around and it seems that other apps are having the same problem: https://www.reddit.com/r/runna/comments/1rhhs2n/runna_wont_start_an_outdoor_run_on_apple_watch/ Does anyone know a way to fix this? My current advice is to repeatedly unpair / re-pair until it works, which isn't really practical! Thanks in advance.
3
0
336
1d
Extended Runtime API - Health Monitoring
In the WWDC 2019 session "Extended Runtime for WatchOS apps" the video talks about an entitlement being required to use the HR sensor judiciously in the background. It provides a link to request the entitlement which no longer works: http://developer.apple.com/contect/request/health-monitoring The session video is also quite hard to find these days. Does anyone know why this is the case? Is the API and entitlement still available? Is there a supported way to run, even periodically, in the background on the Watch app (ignoring the background observer route which is known to be unreliable) and access existing HR sensor data
14
1
1.1k
1d
No Response for Family Controls Distribution Entitlement Request for 2 Weeks
Hello, I have submitted multiple requests for the Family Controls Distribution Entitlement through this form: https://developer.apple.com/contact/request/family-controls-distribution After submitting my requests, I waited for about 1 week but did not receive any response. Since I heard nothing, I contacted Apple Developer Support by email. After that, I finally received a response from an advisor asking for additional information, including my follow-up number. I replied with all the requested information immediately, but it has now been 5 more days and I still have not received any further response. In total, I have been waiting for about 2 weeks for this entitlement request. My app is a Screen Time control / digital wellbeing application that helps users reduce screen time through exercise-based challenges and healthy habits. My app uses the FamilyControls, ManagedSettings, and DeviceActivity frameworks and requires the Distribution Entitlement for App Store release. Here are my details: Case Number: 102866460896 Request Type: Family Controls Distribution Entitlement I understand the team may be busy, but I would appreciate any help checking the status of my request or escalating it if possible. Thank you very much.
Replies
2
Boosts
0
Views
216
Activity
3w
watchOS Motion & Fitness authorization kills foreground iOS companion app with SIGKILL 9
We are seeing a reproducible process termination involving a companion watchOS app and its paired iOS companion app when Motion & Fitness authorization is requested from the watchOS app. Context: iOS app bundle identifier: com.alpha.golfbird watchOS app bundle identifier: com.alpha.golfbird.watchkitapp The watchOS app has WKCompanionAppBundleIdentifier set to the iOS app bundle identifier. Both the iOS app and the watchOS app include NSMotionUsageDescription in their Info.plist files. The watchOS app uses CMAltimeter to read barometric altitude changes for slope-adjusted golf distance calculations. The authorization flow checks CMAltimeter.authorizationStatus(). If the status is notDetermined, it uses CMMotionActivityManager.queryActivityStarting(from:to:to:) before starting CMAltimeter updates, following the known iOS 17.4+ Core Motion authorization behavior. Observed behavior: Install or launch the watchOS companion app for the first time. Open the paired iOS companion app and keep it in the foreground. In the watchOS app, enter the feature that starts the slope/altimeter flow. watchOS shows the Motion & Fitness permission prompt. After the user grants permission, the watchOS app continues normally and CMAltimeter authorization succeeds. At approximately the same time, the foreground iOS app process is terminated. In debug builds, Xcode reports: Debug session ended with code 9: Terminated due to signal 9 In TestFlight builds, users observe that the iOS app closes and relaunches. We do not get a normal iOS crash stack trace for the iOS app, which makes this look like a system termination rather than an application exception. Expected behavior: Granting Motion & Fitness authorization from the watchOS companion app should not terminate the foreground paired iOS companion app, or there should be documented lifecycle behavior and a recommended state-restoration strategy for this case. Question: Is it expected system behavior for a watchOS companion app's Motion & Fitness / Core Motion authorization change to terminate the paired foreground iOS companion app process? If it is expected, is there any documented notification, lifecycle callback, or recommended workaround so the iOS app can preserve and restore user state without looking like a crash? If it is not expected, should this be filed as a Core Motion / watchOS / WatchKit privacy authorization bug via Feedback Assistant, and what diagnostic logs would Apple recommend attaching?
Replies
1
Boosts
0
Views
100
Activity
2w
iOS app will not auto-sleep
Hello, I am working on a iOS app. This is my first big project in SwiftUI which it is going well besides I can not get my phone to auto-sleep/auto-lock when I am in the app. I am testing the app on my phone through xcode. As I am checking my energy report on idle it is saying Low and is almost to the very bottom, and my memory is idling at 90MB~115MB which seems very low. Now If I just leave the app it works right away even if I do not clear the app. I am wondering if anyone has any ideas on how to help me with this issue. I am using HealthKit, a Timer and the camera. I am making a workout app to give some information. I can also give more info if needed I will appreciate any help or ideas. I have tried to use AI to see if it can find any issues and it said that it didn't see anything wrong with my code that will cause it not to sleep now that is AI and it isn't perfect so I would appreciate any help.
Replies
1
Boosts
0
Views
84
Activity
2w
Detecting External Heart Rate Monitor Availability
I've noticed that the Fitness app on the iPhone can rapidly detect the presence of an Apple Watch or External Heart Rate Monitor (e.g., AirPods Pro 3) so that it can adjust the availability of certain exercise types. Is this done through an API that is public? Can third party fitness apps access similar functionality so users can be pre-alerted to the availability of workout types that require a heart rate sensor of some sort?
Replies
1
Boosts
0
Views
136
Activity
1w
Indoor workout location
In the Fitness app under iOS 26, each workout location is displayed on a small map. For workouts with routes, I can already successfully read out the route and thus also determine the starting point. So that works. For indoor workouts such as yoga or indoor rowing, the exact location is also displayed in the Fitness app. I would now also like to read out this location for these indoor workouts in my app. Does anyone know how to do this?
Replies
1
Boosts
0
Views
189
Activity
1w
iOS and Apple touchscreen
would like to enable Apple touschscreens to measure a set of bio parameteres through NDR (negative differential resistance) at the finger tip, whereas the proprietary measurement therapeutically channels out current out of the finger
Replies
1
Boosts
0
Views
219
Activity
1w
HealthKit Blood Pressure authorization broken on iOS 26.5 RC
Hello, I'm experiencing a bug on iOS 26.5 RC1/RC2 where the Blood Pressure option is silently excluded from the HealthKit permission dialog (when requesting HKQuantityTypeIdentifierBloodPressureSystolic and HKQuantityTypeIdentifierBloodPressureDiastolic). This does not reproduce on iOS 26.4.2 or earlier. What happens: When BP types are requested alone, a blank white modal slides up and immediately dismisses — no permission UI is shown. When BP is requested alongside other types, a normal dialog appears for those other types, but Blood Pressure is simply absent from the list. The completion handler returns success = YES, error = nil in both cases, but BP permission is never granted. The result: Settings → Privacy & Security → Health → [app] shows Blood Pressure as requested but not granted getRequestStatusForAuthorizationToShareTypes for the BP types keeps returning ShouldRequest indefinitely HealthKit queries for BP samples return no data Workaround: Manually toggling Blood Pressure to ON in Settings → Privacy & Security → Health → [app name] fixes everything - queries work, notifications fire, and getRequestStatusForAuthorizationToShareTypes correctly returns HKAuthorizationRequestStatusUnnecessary. Environment: Confirmed broken: iOS 26.5 RC1 (23F75) and RC2 (23F77), iPhone 11; iOS 26.5 RC1 (23F73), simulator Confirmed working: iOS 26.4.2 (device), iOS 26.4.1 (simulator) Feedback filed as FB22735935.
Replies
10
Boosts
10
Views
1.6k
Activity
1w
HKWorkoutBuilder.finishWorkout() fails silently (nil workout, nil error) when device is locked (iOS 26.4+)
Hello everyone, We are encountering a critical regression introduced in iOS 26.4 that results in permanent workout data loss for users. When invoking HKWorkoutBuilder.finishWorkout(completion:) while the iOS device is locked, the save operation fails completely. However, it fails silently: the completion handler executes but returns both a nil workout and a nil error. Expected Behavior: Before iOS 26.4 finishWorkout resulted in a workout id, and correctly stored the workout data in HealthKit. According to HealthKit data protection documentation, saving data when the device is locked should either succeed (writing to a temporary journal file to be merged upon unlock) or explicitly throw an error such as HKError.Code.errorDatabaseInaccessible. Actual Behavior: Because the framework returns nil for both the object and the error, the application has no way to detect that the save failed. We cannot implement a retry mechanism or queue the save, resulting in silent data loss. Steps to Reproduce: We have built a Minimal Reproducible Example (MRE) that reliably triggers this: Initialize an HKWorkoutBuilder and call beginCollection(withStart:) followed by endCollection(withEnd:). Wrap the finishWorkout call in a short 5-second asynchronous delay, protected by a UIBackgroundTask to prevent app suspension. Lock the physical device during this 5-second window. The finishWorkout completion handler will execute while the device is locked, returning workout == nil and error == nil. Existing Reports: We have filed this via Feedback Assistant (a month ago) and opened a TSI (a week ago), providing the MRE project and a sysdiagnose captured at the time of failure: Feedback ID: FB22396180 TSI Case-ID: 19755043 As we have not yet received a response or a suggested workaround through these official channels, we are reaching out to the community. Has anyone else encountered this silent failure with HKWorkoutBuilder recently? Any insights or escalation help would be greatly appreciated.
Replies
4
Boosts
1
Views
344
Activity
1w
Unable to invalidate interval: no data source available error when fetching steps using HKStatisticsCollectionQuery
While attempting to read a user’s daily step history spanning backward to the last 7 days, a small but consistent subset of users encounter Error Code 3 with the underlying error description: Error Code 3 "Unable to invalidate interval: no data source available." When this error occurs, we are entirely unable to read their step history. We have received ~10 direct user reports of this within the last couple of weeks.
Replies
12
Boosts
2
Views
788
Activity
1w
How long does Apple Watch keep HealthKit data?
I would like to create an Apple Watch only app that queries data such as blood oxygenation, heart varibility, number of steps, energy consumed, and other data of a similar nature recorded over the past month and performs calculations on them. I read from the HealthKit documentation that Apple Watch synchronizes data with iPhone and periodically deletes older data, and that I can get the date from which the data is available with earliestPermittedSampleDate(). Is there a risk that in general, by making queries to retrieve data up to a month old, the data will no longer be available? I need the app to work properly without needing an iPhone.
Replies
5
Boosts
1
Views
2.4k
Activity
6d
When will the bundle identifier parameter change in Apple Health?
Recently, I am developing an app based on user health data tracking, which involves a scenario where a user wears multiple electronic watches. In this case, I need to distinguish the data sources to prevent the data from not being correctly distinguished when the user wears multiple watches. Currently, bundle identifier seems to be a great choice for me, but after trying to read the materials, it seems that after unbinding, I rebind it. Alternatively, rebinding on another phone would cause this parameter to change. Do you have any better ideas?
Replies
0
Boosts
0
Views
11
Activity
2d
Health permissions problem with watchOS 10.6.2
In the last few weeks 5 users have reported my workout watch app being unable to read health data despite the permissions being enabled in the iPhone Settings app. This has been a common complaint over the years and is usually fixed by disabling the permissions; rebooting both devices; and then enabling them again. This usually nudges iOS into sending the permissions to watchOS. However that procedure doesn't work for these users, all of whom are using watchOS 10.6.2. They are using various versions of iOS 18 or 26 so it seems to be a problem with that version of watchOS, which users are usually limited to because their hardware won't support anything more up to date. It seems that unpairing and re-pairing the watch can fix the problem but not always. I looked around and it seems that other apps are having the same problem: https://www.reddit.com/r/runna/comments/1rhhs2n/runna_wont_start_an_outdoor_run_on_apple_watch/ Does anyone know a way to fix this? My current advice is to repeatedly unpair / re-pair until it works, which isn't really practical! Thanks in advance.
Replies
3
Boosts
0
Views
336
Activity
1d
Extended Runtime API - Health Monitoring
In the WWDC 2019 session "Extended Runtime for WatchOS apps" the video talks about an entitlement being required to use the HR sensor judiciously in the background. It provides a link to request the entitlement which no longer works: http://developer.apple.com/contect/request/health-monitoring The session video is also quite hard to find these days. Does anyone know why this is the case? Is the API and entitlement still available? Is there a supported way to run, even periodically, in the background on the Watch app (ignoring the background observer route which is known to be unreliable) and access existing HR sensor data
Replies
14
Boosts
1
Views
1.1k
Activity
1d