Reading time: 4 min
This recipe shows how to perform a GET request in the background using
BGAppRefreshTaskRequest. For whatever reason, this has way too many gotchas:
- You can't use Alamofire, you have to use
- You can use
URLSessionDataTask, it has to be a
URLSessionDownloadTask. Why? Beats me.
- You can't use callbacks, you must use delegates to track request progress and completion.