BGContinuedProcessingTask does not work on the official release of iOS 26

The following code worked as expected on iOS 26 RC, but it no longer works on the official release of iOS 26. Is there something I need to change in order to make it work on the official version?

Registration

BGTaskScheduler.shared.register(
    forTaskWithIdentifier: taskIdentifier,
    using: nil
) { task in
    //////////////////////////////////////////////////////////////////////
    // This closure is not called on the official release of iOS 26
    //////////////////////////////////////////////////////////////////////

    let task = task as! BGContinuedProcessingTask

    var shouldContinue = true
    task.expirationHandler = {
        shouldContinue = false
    }

    task.progress.totalUnitCount = 100
    task.progress.completedUnitCount = 0

    while shouldContinue {
        sleep(1)

        task.progress.completedUnitCount += 1
        task.updateTitle("\(task.progress.completedUnitCount) / \(task.progress.totalUnitCount)", subtitle: "any subtitle")
        if task.progress.completedUnitCount == task.progress.totalUnitCount {
            break
        }
    }

    let completed = task.progress.completedUnitCount >= task.progress.totalUnitCount
    if completed {
        task.updateTitle("Completed", subtitle: "")
    }

    task.setTaskCompleted(success: completed)
}

Request

let request = BGContinuedProcessingTaskRequest(
    identifier: taskIdentifier,
    title: "any title",
    subtitle: "any subtitle",
)
request.strategy = .queue
try BGTaskScheduler.shared.submit(request)

Sample project code: https://github.com/HikaruSato/ExampleBackgroundProcess

Answered by DTS Engineer in 858901022

The following code worked as expected on iOS 26 RC, but it no longer works on the official release of iOS 26. Is there something I need to change in order to make it work on the official version?

I just tried your test app and it worked fine on my device. What's actually happening on your device?

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

The following code worked as expected on iOS 26 RC, but it no longer works on the official release of iOS 26. Is there something I need to change in order to make it work on the official version?

I just tried your test app and it worked fine on my device. What's actually happening on your device?

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

Thank you for your reply. On iOS 26 official release with iPhone 16e, I found the following error in the Console log (Xcode 26 > Window → Devices and Simulators → Open Console):

bgContinuedProcessing-jp.co.hikarusato.ExampleBackground.ExampleBackgroundProcess.ContinuousBackgroundTask: Foregrounded apps (<private>) don't include expected identifier: <private>

On a device running iOS 26 beta (iPhone 11), the same sample project runs without this error and the BGContinuedProcessingTask works as expected.

On the iPhone 16e as well, before updating to the official release of iOS 26, the BGContinuedProcessingTask was working correctly.

Thank you for your reply. On iOS 26 official release with iPhone 16e, I found the following error in the Console log (Xcode 26 > Window → Devices and Simulators → Open Console):

So, that error message is basically saying that the task identifier that was passed in doesn't match what it was expecting.

A few things to try:

  • Delete your app entirely, reboot the device, then reinstall your app

  • Double check your identifiers just in case you missed something.

  • Change the identifier in your existing app.

  • Duplicate your project and change both the bundle ID and the identifier.

If it's still failing after all of those tests, please replicate the issue (noting the times you tested), collect a sysdiagnose, then file a bug and post the bug number back here. Also, make sure that you don't reboot during that process, as power cycling the device purges too much log data.

On a device running iOS 26 beta (iPhone 11), the same sample project runs without this error and the BGContinuedProcessingTask works as expected.

What beta release is this running? More specifically, is it the "latest" beta prior to the final release or is it one of the earlier betas?

It's possible something more serious is going on, but I suspect what's happening is that there's some kind of data mismatch between what was added when you were running the beta and the current system. In theory, problems like this can happen between any two releases, but they’re more likely with more "distant" betas.

One thing to keep in mind here is that, particularly for major system betas, we don't really "guarantee" app compatibility in the same way we do for actual system releases. That is, if an app works on iOS 18.0 and breaks when you update to iOS 18.1, that's a very serious bug, even if the app works after you delete/reinstall. However, if an app installed in iOS 26.0b1 stops working in iOS 26.0b5, that isn't necessarily a bug. While this kind of breakage is generally unintentional, changes like this do happen during our extended betas which would generally not happen during the normal system update cycle.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

Thank you for your reply. It now works on iOS 26 official release (23A341)! I don’t think I changed anything (I haven’t even rebuilt the sample project), so I’m not sure under what conditions it wasn’t working before.

BGContinuedProcessingTask does not work on the official release of iOS 26
 
 
Q