Post

Replies

Boosts

Views

Activity

Reply to Configurable Watch Widgets "Unable to Load" watchOS 26 Issue
May not be super helpful but for a reference point, I am not seeing this on WatchOS 26 beta 3. Although there's been the some glitches loading the intent configuration UI and it's also unreliable in the Apple Watch app Face Gallery, I just wanted to say this might be something in your setup. Maybe creating a new intent with a single BOOL parameter might be a good test, although that will also need a new IntentTimelineProvider. Are you planning on moving from StaticConfiguration to AppIntentConfiguration for your Apple Watch widget/complications?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
14h
Reply to Custom Intent ParameterSummary based on Widget Kind/ID
Following some further work I think the accepted and recommended answer is actually not all that clear. From some further testing I've found that the following code works just fine in my WidgetConfigurationIntent for conditionally hiding parameters based on the widget family.... Should the statement "" actually be "Parameters cannot be conditionally hidden based on variables passed into the intent"? Thanks static var parameterSummary: some ParameterSummary { When(widgetFamily: .equalTo, .accessoryRectangular) { Summary("Test Info") { \.$hideAverageMarks \.$extendChart \.$showDaysDate } } otherwise : { Summary("Test Info") { \.$recentValueFormat } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
4w
Reply to HealthKit returns different values depending on the OS the request is made on
I would just say this seems like a flawed approach for a HealthKit based app. I don't know many Watch apps which users operate whilst their iPhone is unlocked. If their iPhone isn't unlocked, there will be no access available to their HealthKit HealthStore on that device. If you can ask users on the Watch app to also unlock their iPhone - great. Otherwise I'd stick with what you have available on the Watch.
4w
Reply to Migrate Widgets from StaticConfiguration to IntentConfiguration
Yes, fingers crossed we get some direction or clarity from Apple here because after all these feedbacks, it's like it isn't considered an issue. I've since found an example of where on Apple Watch they seem to have solved this. The "Weather Details" widget/complication which I used in WatchOS 11 wasn't removed from my Watch face after the WatchOS 26 update. In WatchOS 11 it offers no configuration, in WatchOS 26 it does (screenshots here). Unless Apple just made all their Apple Watch widgets/complications AppIntentConfiguration instead of StaticConfiguration from the beginning, they must have had another way to migrate this whilst is persisted on my Watch face. 🤞
4w
Reply to Maximise background update on WatchOS
Hi Ziqiao, Thank you very much for the reply and details on this issue. This information is helpful. If I could just specifically clarify a couple of points just so it's really clear. When the background HealthKit observer query does wake my Watch app in the background and I call WidgetCenter.shared.reloadAllTimelines() before the completion handler, does this remove one of my separate widget extension budget's 4 hourly reloads? With regards to BGAppRefreshTaskRequest, I am confused here. Xcode does offer some supported modes to use this with Watch apps and the link you provided does show availability from WatchOS 6.0+.... Sorry I'm probably missing something here! Many thanks
4w
Reply to WidgetKit WidgetConfigurationIntent Parameter Icons
I have solved this problem. The answer was in the WWDC25 video Get to know App Intends. Here's an example of an WidgetConfigurationIntent to toggle a chart showing data points on or off including icons for the two data point display options. struct WatchDataPointsWidgetIntent: AppIntent, WidgetConfigurationIntent { static var title: LocalizedStringResource = "Data Points Widget Configuration" static var description = IntentDescription("Configure individual data point display for Watch Widgets.") static var isDiscoverable: Bool { return false} init() {} func perform() async throws -> some IntentResult { print("WatchDataPointsWidgetIntent perform") return .result() } @Parameter(title: "Chart Display Options", default: ChartDataPointsOption.showDataPoints) var showDataPoints: ChartDataPointsOption? static var parameterSummary: some ParameterSummary { Summary("Chart Options: \(\.$showDataPoints)") } } enum ChartDataPointsOption: String, AppEnum { case showDataPoints case hideDataPoints static let typeDisplayRepresentation = TypeDisplayRepresentation(name: "Chart Display Data Points") static let caseDisplayRepresentations: [Self: DisplayRepresentation] = [ ChartDataPointsOption.showDataPoints: DisplayRepresentation(title: "Individual Data Points", image: .init(systemName: "chart.dots.scatter")), ChartDataPointsOption.hideDataPoints: DisplayRepresentation(title: "Percentiles Only", image: .init(systemName: "chart.line.uptrend.xyaxis")) ] }
Jun ’25
Reply to widget can access HealthKit data?
Just want to expand a bit on the answer here. Yes Widgets can access the Health store. However, you need other remember that the Health store is only available when the device is unlocked. I will list a few limitations that come to mind from this. There's currently no way to request widget timeline updates only when the device is unlocked. There's currently no way to get reliable updates for iPhone widgets mirrored on Mac that include Health data, these will only update when the user unlocks their iPhone. Widgets on the iPhone Lock Screen can only update their Health data when the device is unlocked, this means if you're displaying a step count for example, it won't update throughout the day automatically. The same also applies to widgets in the Standby mode on iPhone. I've previously posted multiple feedback regarding this. The latest one is FB13879739 although it was closed... maybe we'll see some improvements here one day.
Apr ’25
Reply to What's the correct way to check for unavailable API?
I think I originally didn't file the feedback as I assumed there would be a way to do the availability check and didn't see it as a "bug". There's also the slight problem not not getting responses to feedback 😕 In any case, It is now resolved in the latest iOS 18.1 beta 4 seed (although I'll have to wait a little for testers to update to is before changing my app code to support the API in iOS 18.1 - the crashes will still be my fault!) I have now also filed feedback FB15252677 😊
Topic: Programming Languages SubTopic: Swift Tags:
Sep ’24