Hi,
Overview
- I have a SwiftData project which automatically syncs with CloudKit.
- When I run the app, I see the following error in Xcode logs.
Error updating background task request: Error Domain=BGSystemTaskSchedulerErrorDomain Code=3 "(null)"
My attempt
I can enable Background processing (under Signing & Capabilities > Background modes), but I don't know the BGTaskSchedulerPermittedIdentifiers to add in the Info.plist
Questions
- How can I resolve this?
- If I should enable background processing, what are the
BGTaskSchedulerPermittedIdentifiersto add inInfo.plist?
A similar question was discussed here. The error code is different (3 vs. 8), but the technical nature is pretty much the same:
- The error was triggered by the framework, and is not something that can be fixed from the app side.
- SwiftData + CloudKit creates a new task when it detects that the previous task failed, or that there is unsynchronized data, which can eventually get the data synchronized.
So in case your app data is synchronized, you can ignore the error.
If your app doesn’t synchronize data at all, that will be a coding level issue on your side, and you can follow TN3164 and TN3163 to debug the issue.
Best,
——
Ziqiao Chen
Worldwide Developer Relations.