Post

Replies

Boosts

Views

Activity

Reply to Extended Runtime API - Health Monitoring
Thank you for the response. Unfortunately as this isn't for a research app SensorKit is probably Out. There seems to be a lot of developers all trying to achieve similar things and running into various problems around background access to HealthKit data on WatchOS. This post discusses using a Workout session to maintain background access. This is a very poor user experience as far as battery life goes but many apps are resorting to it for lack of better alternative. This post discusses getting crashes on WatchOS 26 for exhausting CPU time with background HKObserverQueries, I too am seeing this despite calling the completion handler immediately and not running any processing code, is there any solution? Related to the scenario in point 2, are we also required to implement @WKExtensionDelegateAdaptor(ExtensionDelegate.self) var extensionDelegate and call tasks completed or is the completion handler in the observer sufficient? func handle(_ backgroundTasks: Set<WKRefreshBackgroundTask>) { for task in backgroundTasks { task.setTaskCompletedWithSnapshot(false) } } In various places such as here I see discussion about if the app has a complication on the watch face and as such, it gets 4 updates an hour. This I find confusing... Pre-WatchOS 9 with ClockKit complications this makes sense, but since migrating to WidgetKit, I now get my widget extension woken for timeline updates and not my app. This is fine but not helpful for my use case and so has caused a regression in my app as I no longer get Watch app background updates from this... I hope I've made the differences clear here? Related to previous point, my understanding with this code try await healthStore.enableBackgroundDelivery(for: HKQuantityType(.heartRate),frequency: .immediate) is that although I ask for immediate, I'll be limited to 1 update an hour for heart rate on WatchOS, do I still get that update if I don't have a complication on the Watch face? If I do have a complication on the active watch face, does that update have any impact on my complication WidgetKit timeline refreshes? Overall I think there is a lot of confusion in the developer community with this topic and if not before, hopefully in the next cycle this is either all cleared up or even better some new slightly less restrictive APIs arrive. To answer your question for me, my use case is wanting to review health data that the watch already automatically records (I don't want to trigger battery intensive additional sampling) and then with provide notifications or other features to the user from that. These updates could probably be done in a second of CPU time if only I could reliably access it...
Mar ’26
Reply to How to monitor heart rate in background without affecting Activity Rings?
Just seen this post. I feel given the detailed write up it's a shame no one's otherwise picked it up with at least some response. Ultimately I think there's no solution here with the current APIs. There are background observer HealthKit APIs for HR data but they don't work to your requirements and potentially with WatchOS 26 they don't work well at all! (see here) I wasn't aware of the entitlement you mention for Health Monitoring, it caused me to write this post. One other "solution" I'm aware of if your app includes a complication on the watch face -> If you use the legacy ClockKit APIs rather than the newer WidgetKit ones to create this complication, you'll get app waking calls to update this. If you've migrated to WidgetKit this only wakes up the Widget extension which is not so useful. This will still likely not give you the frequency you require. Beyond that I think it's still a waiting game for better APIs.
Feb ’26
Reply to SwiftUI iOS 26 .safeAreaBar issue with large navigation title
@DTS Engineer Thanks for the suggestion, sorry I should have mentioned I tried that. Unfortunately doing this puts the safeAreaBar content in the wrong place, overlaid on the whole view rather than the scrollview. Hopefully the screenshot demonstrates this. I've now filed a feedback for this FB21613303. I didn't put the feedback in originally because I've submitted 3 in the past 3 months all with sample code, details etc... and not even had an acknowledgement ☹️ But if you say they help, I will keep submitting! Thanks
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’26
Reply to Guidance / Documentation on iOS 18.6.1 Blood Oxygen Saturation
@DTS Engineer this is helpful thank you. Are you able to verify that doing this does not breach App Review or other terms as seemingly it's bypassing the same restrictions Apple has themselves had to implement? Finally this does result in a poor user experience: I don't know which user's Watches are affected, there's no API to query this? It's not actually region specific. Does the HealthKit source differ maybe such that I can observe that? A separate syncing system is inefficient, less likely to be accurate and has all the limitations mentioned previously re. access to iPhone Health Store when device is locked I presume there's not much to add on these points so I'll file a feedback but I do think this is confusing/misleading for users who otherwise presumably expect the SPO2 data to behave like any other.
Sep ’25
Reply to Guidance / Documentation on iOS 18.6.1 Blood Oxygen Saturation
Going back to my original questions I think I have some answers forming: Yes, SPO2 values are saved to Apple Health on iPhone Yes, background measurements are now taken in the same way Yes, the data is visible through the HealthKit APIs on iPhone only - not directly on Apple Watch No, HealthKit does not sync these values back to the Apple Watch Health Store Does this mean I'd have to use frameworks like WatchConnectivity to pass SPO2 data back to my Watch app? Am I allowed to do that as seemingly Apple Health isn't? Is there a better approach given the user's iPhone is most likely locked when using their Apple Watch and so the Health store on iPhone is unavailable?
Sep ’25
Reply to Migrate Widgets from StaticConfiguration to IntentConfiguration
For any unfortunate peoples stumbling across this, the issue was not solved in the RC builds of iOS & WatchOS 26. I'm shipping anyway and have had to build in a knowledge base in the app to help users with missing complications. 😞 Not the outcome I wanted and will undoubtedly lead to a lot of emails and negative reviews..... But I have users who expect the latest features so what else can I do.....
Sep ’25
Reply to `onTapGesture` not triggered on `Map` views
I'm also seeing this problem with Swift Charts. This is with the latest Xcode 26 Beta 6 and iOS 26 Beta 8. This issue doesn't affect devices running iOS 18 and 17 from my testing. As such I've made this modifier which may help someone, hopefully I can remove it in the release seed but who knows! extension View { func CustomTapGesture(tapCount:Int = 1, perform action: @escaping () -> Void ) -> some View { modifier(TapGestureModifier(tapCount: tapCount, action: action)) } } struct TapGestureModifier: ViewModifier { var tapCount:Int = 1 var action: (() -> Void) func body(content: Content) -> some View { if #available(iOS 26.0, *) { content.simultaneousGesture(TapGesture(count: tapCount).onEnded { action() }) } else { content.onTapGesture(count: tapCount) { action() } } } } Which can be used like this: Text("Hello World") .CustomTapGesture(tapCount:2) { UIImpactFeedbackGenerator().impactOccurred() } To be clear, this doesn't work as well for iOS 26 users as the standard .onTapGesture but it is a workaround.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’25
Reply to Guidance / Documentation on iOS 18.6.1 Blood Oxygen Saturation
Hi Ziqiao, Thank you for the response on this. All your first paragraph points sound good. Unfortunately I too don't have an affected device so short of importing one, I'm not sure on the exact behaviour. As for the measurements, yes any further details you can provide would be good including if the background measurements are still taken in the same way on these models and if data can be automatically synced back to iPhone and therefore the HealthKit database when the iPhone is available. Thank you
Aug ’25
Reply to Extended Runtime API - Health Monitoring
Thank you for the response. Unfortunately as this isn't for a research app SensorKit is probably Out. There seems to be a lot of developers all trying to achieve similar things and running into various problems around background access to HealthKit data on WatchOS. This post discusses using a Workout session to maintain background access. This is a very poor user experience as far as battery life goes but many apps are resorting to it for lack of better alternative. This post discusses getting crashes on WatchOS 26 for exhausting CPU time with background HKObserverQueries, I too am seeing this despite calling the completion handler immediately and not running any processing code, is there any solution? Related to the scenario in point 2, are we also required to implement @WKExtensionDelegateAdaptor(ExtensionDelegate.self) var extensionDelegate and call tasks completed or is the completion handler in the observer sufficient? func handle(_ backgroundTasks: Set<WKRefreshBackgroundTask>) { for task in backgroundTasks { task.setTaskCompletedWithSnapshot(false) } } In various places such as here I see discussion about if the app has a complication on the watch face and as such, it gets 4 updates an hour. This I find confusing... Pre-WatchOS 9 with ClockKit complications this makes sense, but since migrating to WidgetKit, I now get my widget extension woken for timeline updates and not my app. This is fine but not helpful for my use case and so has caused a regression in my app as I no longer get Watch app background updates from this... I hope I've made the differences clear here? Related to previous point, my understanding with this code try await healthStore.enableBackgroundDelivery(for: HKQuantityType(.heartRate),frequency: .immediate) is that although I ask for immediate, I'll be limited to 1 update an hour for heart rate on WatchOS, do I still get that update if I don't have a complication on the Watch face? If I do have a complication on the active watch face, does that update have any impact on my complication WidgetKit timeline refreshes? Overall I think there is a lot of confusion in the developer community with this topic and if not before, hopefully in the next cycle this is either all cleared up or even better some new slightly less restrictive APIs arrive. To answer your question for me, my use case is wanting to review health data that the watch already automatically records (I don't want to trigger battery intensive additional sampling) and then with provide notifications or other features to the user from that. These updates could probably be done in a second of CPU time if only I could reliably access it...
Replies
Boosts
Views
Activity
Mar ’26
Reply to How to monitor heart rate in background without affecting Activity Rings?
Just seen this post. I feel given the detailed write up it's a shame no one's otherwise picked it up with at least some response. Ultimately I think there's no solution here with the current APIs. There are background observer HealthKit APIs for HR data but they don't work to your requirements and potentially with WatchOS 26 they don't work well at all! (see here) I wasn't aware of the entitlement you mention for Health Monitoring, it caused me to write this post. One other "solution" I'm aware of if your app includes a complication on the watch face -> If you use the legacy ClockKit APIs rather than the newer WidgetKit ones to create this complication, you'll get app waking calls to update this. If you've migrated to WidgetKit this only wakes up the Widget extension which is not so useful. This will still likely not give you the frequency you require. Beyond that I think it's still a waiting game for better APIs.
Replies
Boosts
Views
Activity
Feb ’26
Reply to SwiftUI iOS 26 .safeAreaBar issue with large navigation title
@DTS Engineer Thanks for the suggestion, sorry I should have mentioned I tried that. Unfortunately doing this puts the safeAreaBar content in the wrong place, overlaid on the whole view rather than the scrollview. Hopefully the screenshot demonstrates this. I've now filed a feedback for this FB21613303. I didn't put the feedback in originally because I've submitted 3 in the past 3 months all with sample code, details etc... and not even had an acknowledgement ☹️ But if you say they help, I will keep submitting! Thanks
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’26
Reply to Guidance / Documentation on iOS 18.6.1 Blood Oxygen Saturation
@DTS Engineer this is helpful thank you. Are you able to verify that doing this does not breach App Review or other terms as seemingly it's bypassing the same restrictions Apple has themselves had to implement? Finally this does result in a poor user experience: I don't know which user's Watches are affected, there's no API to query this? It's not actually region specific. Does the HealthKit source differ maybe such that I can observe that? A separate syncing system is inefficient, less likely to be accurate and has all the limitations mentioned previously re. access to iPhone Health Store when device is locked I presume there's not much to add on these points so I'll file a feedback but I do think this is confusing/misleading for users who otherwise presumably expect the SPO2 data to behave like any other.
Replies
Boosts
Views
Activity
Sep ’25
Reply to Guidance / Documentation on iOS 18.6.1 Blood Oxygen Saturation
Going back to my original questions I think I have some answers forming: Yes, SPO2 values are saved to Apple Health on iPhone Yes, background measurements are now taken in the same way Yes, the data is visible through the HealthKit APIs on iPhone only - not directly on Apple Watch No, HealthKit does not sync these values back to the Apple Watch Health Store Does this mean I'd have to use frameworks like WatchConnectivity to pass SPO2 data back to my Watch app? Am I allowed to do that as seemingly Apple Health isn't? Is there a better approach given the user's iPhone is most likely locked when using their Apple Watch and so the Health store on iPhone is unavailable?
Replies
Boosts
Views
Activity
Sep ’25
Reply to Using HealthKit to display data on CarPlay UI
I think you'll struggle here. As I understand it the iPhone is generally locked when in use with CarPlay. If the iPhone is locked, access to the Health Store database is unavailable. This would mean you couldn't access those blood glucose values.
Topic: UI Frameworks SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’25
Reply to Sleep Score API access
Ok done, FB20278031 Anything that can be done to boost the feedback is very appreciated 🙏
Replies
Boosts
Views
Activity
Sep ’25
Reply to What determines which suggested apps are listed in Health?
I second this query. As the developer of a Heart Rate app, it's particularly frustrating the the Heart Rate section of the Apple Health app offers step trackers and yoga classes which don't or barely show HR data to their users.
Replies
Boosts
Views
Activity
Sep ’25
Reply to Guidance / Documentation on iOS 18.6.1 Blood Oxygen Saturation
Any updates on this? @DTS Engineer Thanks
Replies
Boosts
Views
Activity
Sep ’25
Reply to Migrate Widgets from StaticConfiguration to IntentConfiguration
For any unfortunate peoples stumbling across this, the issue was not solved in the RC builds of iOS & WatchOS 26. I'm shipping anyway and have had to build in a knowledge base in the app to help users with missing complications. 😞 Not the outcome I wanted and will undoubtedly lead to a lot of emails and negative reviews..... But I have users who expect the latest features so what else can I do.....
Replies
Boosts
Views
Activity
Sep ’25
Reply to `onTapGesture` not triggered on `Map` views
I'm also seeing this problem with Swift Charts. This is with the latest Xcode 26 Beta 6 and iOS 26 Beta 8. This issue doesn't affect devices running iOS 18 and 17 from my testing. As such I've made this modifier which may help someone, hopefully I can remove it in the release seed but who knows! extension View { func CustomTapGesture(tapCount:Int = 1, perform action: @escaping () -> Void ) -> some View { modifier(TapGestureModifier(tapCount: tapCount, action: action)) } } struct TapGestureModifier: ViewModifier { var tapCount:Int = 1 var action: (() -> Void) func body(content: Content) -> some View { if #available(iOS 26.0, *) { content.simultaneousGesture(TapGesture(count: tapCount).onEnded { action() }) } else { content.onTapGesture(count: tapCount) { action() } } } } Which can be used like this: Text("Hello World") .CustomTapGesture(tapCount:2) { UIImpactFeedbackGenerator().impactOccurred() } To be clear, this doesn't work as well for iOS 26 users as the standard .onTapGesture but it is a workaround.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’25
Reply to Guidance / Documentation on iOS 18.6.1 Blood Oxygen Saturation
Hi Ziqiao, Thank you for the response on this. All your first paragraph points sound good. Unfortunately I too don't have an affected device so short of importing one, I'm not sure on the exact behaviour. As for the measurements, yes any further details you can provide would be good including if the background measurements are still taken in the same way on these models and if data can be automatically synced back to iPhone and therefore the HealthKit database when the iPhone is available. Thank you
Replies
Boosts
Views
Activity
Aug ’25
Reply to Xcode 26 Beta 5 HealthKit DLYD Symbol Crash
Fixed in Xcode 26 beta 6!
Replies
Boosts
Views
Activity
Aug ’25
Reply to Xcode 26 Beta 5 Universal: Not able to install iOS 26 Beta 5 simulator on intel macs
I'm having issues on my Intel Mac mini too
Replies
Boosts
Views
Activity
Aug ’25
Reply to iOS 26 navigationTransition .zoom issue
I've seen a similar issue, I'm hoping this is a bug which gets fixed, I've filed a feedback, suggest you do the same.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’25