Bundle ID: com.lavillamergo.Betriebszentrale
CloudKit Container: iCloud.com.lavillamergo.Betriebszentrale
Environment: Production
Stack: SwiftUI + SwiftData with NSPersistentCloudKitContainer (cloudKitDatabase: .automatic)
Issue: CloudKit sync (export) fails consistently in the Production environment with CKError.partialFailure (CKErrorDomain error 2). The underlying console log (captured via Console.app on a connected device) reveals:
CoreData+CloudKit: -[PFCloudKitExporter exportOperationFinished:withSavedRecords:deletedRecordIDs:operationError:]: Modify records finished: ... Error Domain=CKErrorDomain Code=2 "CKInternalErrorDomain: 1011" ... Never successfully initialized and cannot execute request.
Reproducibility: The error occurs on every device that connects to this container in Production, including a brand-new iPhone (iPhone 12, iOS 26.5.2) that had never previously used this app or synced with this iCloud account — ruling out device-local corruption.
Already ruled out:
iCloud storage quota (6TB plan, 2TB used, ample free space)
Stale/duplicate records in the Production zone (queried CD_Verkauf sorted by createdTimestamp ascending via CloudKit Console — no pre-existing records found, all from the current session)
Development/Production schema mismatch ("Deploy Schema Changes" dialog shows 0 pending changes across Record Types, Indexes, and Security Roles)
Network connectivity (stable fiber WiFi throughout all testing)
Recent schema changes made: added missing inverse relationships on several @Relationship properties, changed deleteRule from .cascade to .nullify on three relationships (Verkauf.positionen, LVVerkauf.positionen, Aufgabe.checklistePunkteStorage) — required by CloudKit's relationship constraints.
Impact: Cross-device sync via Production CloudKit is effectively non-functional. Local per-device data storage works correctly.
Question: What causes "Never successfully initialized" (CKInternalErrorDomain 1011) in this scenario, and how can it be resolved without a full container/environment reset?
1
0
22