Also interested in hearing anyone that has gotten BGProcessingTasks or BGAppRefreshTasks to trigger in the "real world". Nothing I do seems to make a difference and no projects that are supposed to "teach" how-to use them work.
Post
Replies
Boosts
Views
Activity
In this case I've got a few things working against NSURLSession. 1) We have a large number of uploads (images/videos/etc) that we cannot do in bulk, and the guidelines mention using less background sessions and instead make them larger and 2) We are using the Firebase SDK for our uploads and they don't seem to have a configurable way to set the uploads as needing to use the background NSURLSession.Which is why I was really excited to learn about BGProcessingTasks, but then equally dismayed when nothing I did ever triggered them. How can I give my processing task the best chance of getting run?
"After digging in deeper and more thoroughly these are my results (for anyone else who might find this thread and have similar questions).1) Refresh tasks and processing tasks are scheduled and trigger at what seem to be the same time. So just because refresh tasks are shorter they do not get triggered any more often than a processing task.2) If you want to have any sort of reliability to your tasks you should set the task "requiresExternalPower" to TRUE. This is the most important step. If you set this to false you are in fact reducing the chance of your task being triggered even if the user keeps their phone plugged in! So unless your use case involves a user who would go long periods of time w/o plugging in their phone you should never set this to false. At least until apple updates whatever logic they are using to determine when tasks are triggered.