Here is what I'm trying to do:
Users in my app will generally be offline while they use the app to gather data. Then they will move back into WiFi range. I'd like the iOS to trigger a background task when they come back online to upload the data.
What I've tried:
When the app goes into background mode I submit a BGProcessingTaskRequest
(request.requiresNetworkConnectivity = true).
I've called _simulateLaunchForTaskWithIdentifier from XCode and everything works perfectly.
The problem is that I can't get the background task to trigger for real. I've sat with the app backgrounded with WiFi for a half an hour and nothing uploaded. How long should I expect it to take? Should I be using BGAppRefreshTaskRequest for this use case?
Users in my app will generally be offline while they use the app to gather data. Then they will move back into WiFi range. I'd like the iOS to trigger a background task when they come back online to upload the data.
What I've tried:
When the app goes into background mode I submit a BGProcessingTaskRequest
(request.requiresNetworkConnectivity = true).
I've called _simulateLaunchForTaskWithIdentifier from XCode and everything works perfectly.
The problem is that I can't get the background task to trigger for real. I've sat with the app backgrounded with WiFi for a half an hour and nothing uploaded. How long should I expect it to take? Should I be using BGAppRefreshTaskRequest for this use case?