I have an iOS application which uses both Silent Push Notifications and Background Tasks to keep the application up to date, both wake up the app even if it's killed and allow to run code on the background.
Now I've turned this app into a Mac Catalyst app. I've managed to get Push Notification working, but I'm only receiving them when the app is opened, the app doesn't wake up if it's closed.
Also, the Background Tasks don't work at all, the UIBackgroundRefreshStatus is always UIBackgroundRefreshStatusDenied.
Is there any further configuration needed to run background code on Mac Catalyst? or is it not possible at all?
Thanks.
Post
Replies
Boosts
Views
Activity
I have a widget with a few buttons which call the same AppIntent. If I press the buttons slowly everything works perfectly, but If I press them quickly (I assume, before the re-render from the previous press has finished) the system opens my app instead of calling the AppIntent. Is this a bug? is there a way to prevent this?
Thanks.
struct MyIntentConfiguration: WidgetConfigurationIntent {
static var title: LocalizedStringResource = "Habit Selector"
static var description: IntentDescription = IntentDescription("Select Habits")
@Parameter(title: "Select Habits", size: 9)
var habits: [HabitEntity]
}
The previous code correctly allows the user to pick the 9 habits they want to track in the widget. But initially the widget is empty. How can I define default values for the Parameter "habits" taking into account that the values are dynamic?
We've noticed that network requests triggered when a user interacts with our widget are very unreliable. In development, they almost always work, but in production, many of them never reach the server, especially when many requests are performed in a row.
The requests are performed using the URLSession.shared singleton instance:
let session = URLSession.shared
let task = session.dataTask(with: request) { data, response, error in
...
}
task.resume()
Are there any limitations or restrictions on Interactive Widgets in a production environment that might cause this behavior?
Is there a different way to implement or configure widgets to ensure network requests are reliably performed?
Thank you.