The expirationHandler on BGProcessingTask is a () -> Void closure. It provides no information about why it was called.
In my testing, all of the following trigger the same handler:
- Time expiration
- Resource pressure (CPU, memory, battery)
- Not reporting progress
- User tapping "Stop" on the Live Activity
There is no way for the app to tell these apart.
Questions:
Q1. Is there an official, complete list of all conditions that trigger expirationHandler? The documentation only mentions "time expires."
Q2. What is the specific time limit before timeout? If it varies by device state, what are the conditions?
Q3. A way to distinguish the reason is needed. "User stop" and "system expiration" require completely different handling. Currently this is impossible.
Environment: iOS 26, physical device
Let’s focus this discussion on your other thread.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"