In Efficiency awaits: Background tasks in SwiftUI, the isStormy() func has only one request. What if we have multiple requests. What's the best implementation?
multiple background requests
Use one session, according to Use Background Sessions Efficiently
I noticed if you init a session with a config with the same identifier you will actually get the previous instance.
I assume you have to set a taskDescription
on the task to be able to identify it in .backgroundTask()
on the Scene, where presumably you have to retrieve all the completed tasks from the session and deal with the results.