Questions tagged [nspersistentcloudkitcontainer]

111 questions
1
vote
0 answers

No stores in the coordinator are configured to use CloudKit

Upon attempting to run container = NSPersistentCloudKitContainer(name: "Test") container.initializeCloudKitSchema() I'm getting the following error: NSLocalizedFailureReason=Couldn't initialize CloudKit schema because no stores in the coordinator…
1
vote
1 answer

Fast local update of CoreData+CloudKit with public database changes

My app uses CoreData+Cloudkit with a public database. By default, iCloud sync with a public database is only done at launch and then every half hour. Since my app requires faster sync, all users are logged in to iCloud, and subscribed to iCloud…
Reinhard Männer
  • 14,022
  • 5
  • 54
  • 116
1
vote
1 answer

SwiftUI CloudKit Public Database with NSPersistentCloudKitContainer

Based on WWDC20 talk bellow: https://developer.apple.com/videos/play/wwdc2020/10650/ The way to setup CloudKit Public Database with NSPersistentCloudKitContainer in "one line of code" is this: description.setOption(true as NSNumber, forKey:…
Mane Manero
  • 3,086
  • 5
  • 25
  • 47
1
vote
1 answer

Data associated with iCloud account when switching from development to production

I'm about to switch my CloudKit schema from development to production before sending the app to TestFlight, but I'm confused about something. I've been adding many records in Core Data while testing in development mode. Some are specifically crafted…
1
vote
1 answer

CoreData+CloudKit activity import crash (iOS 14)

Very soon after launch CoreData+CloudKit (NSPersistentCloudKitContainer) crashes by throwing this exception: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Must register a handler for activity identifier…
1
vote
2 answers

Update iCloud Scheme through NSPersistentCloudKitContainer to newest Core Data Version

I'm stuck in finding a proper solution for migrating the CloudKit scheme to my newest local Core Data Model. The CloudKit model won't update even when pushing new changes. I tried to update the scheme manually but it appears to be faulting and quite…
EMart
  • 65
  • 4
1
vote
0 answers

NSPersistentCloudKitContainer does not sync in background

I am currently testing the NSPersistentCloudKitContainer. I have strictly followed the guidelines of the new documentation. Basically everything works as desired. I use the option NSPersistentStoreRemoteChangeNotificationPostOptionKey on the…
Sebastian Boldt
  • 5,283
  • 9
  • 52
  • 64
1
vote
0 answers

Issue with optional Core Data relationship using NSPersistentCloudKitContainer

I am using NSPersistentCloudKitContainer, not sure if that's the cause of my issue or CloudKit generic behaviour. The sync setup works fine so far. I am now adding a new feature, causing some an issue: I have an entity Item, which can be put in a…
1
vote
1 answer

Strategies for handling future schema changes in CloudKit

My understanding of CloudKit is that if the user has two devices - one with a version of the app with a v2 schema and another with a v1 schema - the device with the v1 schema will receive new data but only for the fields in v1. All new data in new…
Carl
  • 683
  • 5
  • 18
1
vote
0 answers

NSPersistentCloudKitContainer on a specific CKRecordZone

I'm investigating the way to add a iCloud-sync functionality to a NSPersistentDocument based app. Could I use NSPersistentCloudKitContainer and use a different CKRecordZone for each document? Each document would then sync to iCloud. Note that using…
vomi
  • 993
  • 8
  • 18
1
vote
0 answers

How to update users to a new CloudKit Container when using NSPersistentCloudKitContainer?

I have a model that has already been pushed to production, and I would like to move an attribute to a new entity as a relationship. From this: extension Note { @NSManaged public var drawingData: Data? .... } To This: extension Note { …
1
vote
1 answer

'NSAllocateMemoryPages() failed' with NSPersistentCloudKitContainer

DESCRIPTION OF PROBLEM: When syncing large items (such as images) with NSPersistentCloudKitContainer, my app crashes with the error 'NSAllocateMemoryPages() failed'. This happens repeatedly within a minute of launching the app. It happens both in…
mort
  • 71
  • 1
  • 6
1
vote
1 answer

Mac catalyst with NSPersistentCloudKitContainer crash: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)

My app uses NSPersistentCloudKitContainer and it works just fine on iPhone and iPad. Once I ported it to Mac (Catalyst), I started experiencing a EXC BAD INSTRUCTION crash and I can't to wrap my head around it. I decided to port to MacOS Apple's…
rs7
  • 1,618
  • 1
  • 8
  • 16
0
votes
0 answers

CloudKit notification is fireing many times on one import

I've set up a Notification listener which should fire when the CloudKit (NSPersistentCloudKitContainer) import is finished (so once), but the notification gets fired twice, sometimes thrice on one View. Maybe it's the code that is wrong, or maybe…
Stan
  • 77
  • 1
  • 7
0
votes
0 answers

How to fetch two separate Core Data Entities without a relationship in SwiftUI

Say, I have 2 Entities: GameLevel and UserResult. The GameLevel is fetched from my Server and stored locally in Core Data. And UserResult - is the result of the user playing this level (date when played, score, etc), it's created by the user and…