@stroughtonsmith Update: this resolved the crash. What must have happened is, since sometimes the register launchHandler closure is not invoked (https://mastodon.world/@jordanhipwell/115549174088540139), nothing happened upon tapping the start processing button, so the user must have rage tapped the button a couple times within the same second. One mystery solved ๐
![BGTaskScheduler.shared.register(forTaskWithIdentifier: taskIdentifier, using: .main) { @Sendable [weak self] task in
guard self != nil else { return }
startProcessing(backgroundTask: task as? BGContinuedProcessingTask) // Not called
}
let request = BGContinuedProcessingTaskRequest(identifier: taskIdentifier, title: title, subtitle: subtitle)
request.strategy = .fail
if BGTaskScheduler.supportedResources.contains(.gpu) {
request.requiredResources = .gpu
}
do {
try BGTaskScheduler.shared.submit(request)
} catch {
startProcessing(backgroundTask: nil) // Not called
}](https://files.mastodon.social/cache/media_attachments/files/115/549/174/126/359/988/small/975545c5ac584439.png)





