Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

`BGAppRefreshTask` vs `BGProcessingTask` understanding timing

I'm trying to understand the distinction between BGAppRefreshTask and BGProcessingTask where for processing Apple's docs say for a process that “takes minutes” whereas refresh they say for a “short request task.” I am iterating through workouts in HealthKit which takes under a minute, so should I be using BGAppRefreshTask?

like image 720
GarySabo Avatar asked Oct 29 '25 12:10

GarySabo


1 Answers

The BGAppRefreshTask has a time limit of 30 seconds. So if you can't guarantee the task will take less than that time, the BGProcessingTask may probably more appropriate.

This was noted in the WWDC 2019 Session 707 Advances in App Background Execution. The relevant time index is: 18:51

like image 181
richardpiazza Avatar answered Nov 01 '25 04:11

richardpiazza



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!