I was very excited to see the addition of push notifications for widgets. However upon further inspection, the way it is implemented seems too limiting for real life apps.
I have an app for time tracking with my own backend. The app syncs with my backend in the main executable (main target). My widgets are more lightweight as they only access data in the shared app container, but they don't perform sync with the server directly to avoid race conditions with the main app.
I was under the impression that the general direction of the platform is to be doing most things in the main app target (also App Intents work that way for the most part), so the fact that the WidgetPushHandler just calls the widget's method to reload the timeline is very unfortunate. In an ideal scenario I also need the main app to be 'woken up' to perform the sync with the server, and once that's done I'd update the widget's timeline and where I would just read data from the shared app container.
So, my questions are:
What is the recommended way of updating the widgets when this push notification arrives in the case that the main app target needs to perform the sync first?
Is there any way how to detect that the method
func timeline(for configuration: InteractiveTrackingWidgetConfigurationAppIntent, in context: Context)
was called as a result of the push notification being received?
Can I somehow schedule a background task from the widget's reloadTimeline() function?
How can I get the push token later, in case that I don't save it right away the first time the WidgetPushHandler's pushTokenDidChange() is called?
Thank you for your work on this and hopefully for your answers.
FB19356256
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I am experimenting with Foundation Models in my time tracking app to analyze users tracked events, but I am finding that the model struggles with even basic computation of time. Specifically converting from seconds to hours and minutes.
To give just one example, when I prompt:
"Convert 3672 seconds to hours, minutes, and seconds. Don't include the calculations in the resulting output"
I get this:
"3672 seconds is equal to 1 hour, 0 minutes, and 36 seconds".
Which is clearly wrong - it should be 1 hour, 1 minute, and 12 seconds. Another issue that I saw a lot is that seconds were considered to be minutes, or that the hours were just completely off.
What can I do to make the support for math better? Or is that just something that the model is not meant to be used for?
Topic:
Machine Learning & AI
SubTopic:
Foundation Models
I have accidentally missed the sign up window for the UX Writing lab by 1 hour, but I'd still love to join it if at all possible. I have had this lab several times in the past and it was always very informative.
I have a time tracking app that helps people make the most of their time. https://apps.apple.com/us/app/timelines-time-tracking/id1112433234
I'm looking for guidance on how to improve copywriting in my onboarding sequence, on my paywall, and overall throughout the app.
Thank you for considering. My Apple ID is lukas[at]glimsoft.com.
I am excited to try Foundation Models during WWDC, but it doesn't work at all for me. When running on my iPad Pro M4 with iPadOS 26 seed 1, I get the following error even when running the simplest query:
let prompt = "How are you?"
let stream = session.streamResponse(to: prompt)
for try await partial in stream {
self.answer = partial
self.resultString = partial
}
In the Xcode console, I see the following error:
assetsUnavailable(FoundationModels.LanguageModelSession.GenerationError.Context(debugDescription: "Model is unavailable", underlyingErrors: []))
I have verified that Apple Intelligence is enabled on my iPad. Any tips on how can I get it working? I have also submitted this feedback: FB17896752
Topic:
Machine Learning & AI
SubTopic:
Foundation Models
On watchOS 11, buttons now have an implicit leading and trailing padding which is similar in length to the .scenePadding.
This works well in most cases, but sometimes it would be useful to be able to change the padding or remove it altogether, to fit with the rest of the screen's design.
Is there any way currently to remove this padding? Thank you.
I would like to call my App Intent directly from my main app target, in an effort to start a live activity in the background when I receive a silent push notification from the server.
I have seen in one of the WWDC developer lounges on Slack that this should be possible. Here is how I tried doing it: (it was recommended like that in the lounge)
let appIntent = LiveActivityRefreshIntent()
Task {
try await appIntent()
}
But I get a compiler error:
Instance method 'callAsFunction(donate:)' requires the types '(some IntentResult).Value' and 'Never' be equivalent
It's strange because as far as I can tell, I cannot declare my perform method as returning Never. Here is the signature and return value of my App Intent's perform method:
func perform() async throws -> some IntentResult {
LiveActivityController.shared.updateLiveActivities()
return .result()
}
Is there still a way to call the app intent from my code? If so, how?