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.