SwiftData + CloudKit: BGSystemTaskScheduler Code=8

Hi everyone,

On macOS 26.4 beta (with Xcode 26.4 beta), I’m seeing the following console messages in a brand new SwiftData + CloudKit template project (no custom logic added, fresh CloudKit container):

updateTaskRequest called for a pre-running task com.apple.coredata.cloudkit.activity.export.F9EE783D-7521-4EC2-B42C-9FD1F29BA5C4

updateTaskRequest called for an already running/updated task com.apple.coredata.cloudkit.activity.export.F9EE783D-7521-4EC2-B42C-9FD1F29BA5C4

Error updating background task request: Error Domain=BGSystemTaskSchedulerErrorDomain Code=8 "(null)"

These messages appear:

  • When CloudKit is enabled
  • Occasionally on app launch
  • Often when bringing the app back to the foreground (Cmd-Tab away and back)
  • Even with zero additional SwiftData logic

They do not appear when CloudKit is disabled.

This behavior is reproducible on a completely new project with a fresh CloudKit container.

Questions:

  1. What exactly do these messages indicate?
  2. Is BGSystemTaskScheduler Code=8 expected in this context?
  3. Are these safe to ignore?
  4. Is this a known change in logging behavior in macOS 26.4 beta?

Additionally, in a larger project I’ve observed SwiftData crashes and initially suspected these logs might be related. However, since the issue reproduces in a fresh template project, I’m unsure whether this is simply verbose beta logging or something more serious.

Any clarification would be appreciated.

Filed as FB21993521.

Answered by DTS Engineer in 876876022

Just to share a bit more color, the error happens when Core Data + CloudKit schedules a new export task when another one is still in progress. In this situation, the scheduling will fail, and the system will drop the new task.

In Core Data + CloudKit, however, I don't think this is an issue, because NSPersistentCloudKitContainer will schedule another export task next time when it detects something yet to export, which can happen some time after it detects that a previous export task failed, or that a new change on the Core Data store was made, and so the data should eventually be exported.

You should be able to observe the behavior by capturing and analyzing a sysdiagnose.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Thanks for the feedback, we'll follow up via Feedback Assistant.

Just to share a bit more color, the error happens when Core Data + CloudKit schedules a new export task when another one is still in progress. In this situation, the scheduling will fail, and the system will drop the new task.

In Core Data + CloudKit, however, I don't think this is an issue, because NSPersistentCloudKitContainer will schedule another export task next time when it detects something yet to export, which can happen some time after it detects that a previous export task failed, or that a new change on the Core Data store was made, and so the data should eventually be exported.

You should be able to observe the behavior by capturing and analyzing a sysdiagnose.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

SwiftData + CloudKit: BGSystemTaskScheduler Code=8
 
 
Q