Search results for

NSPersistentCloudKitContainer

589 results found

Post

Replies

Boosts

Views

Activity

CloudKit + Core Data General Questions (HIG)?
I've got a few quetsions about designing an acceptable user experience involving migrating from legacy Core Data store to a CloudKit+CoreData store.Given the user can have a legacy data store on all of their devices and only one of those sets of data will be considered supreme, I need a means to effectively merge all this data in a non-destructive way.1) Does NSPersistentCloudKitContainer provide a means of opting into or out of CLoudKit storage for the user? Is it fully reliant on the user going into settings and flipping the iCloud-Data switch? Or can I maintain a local app settings flag? Can I tell a NSPersistentCloudKitContainer to no longer sync during it's lifecycle? 2)
1
0
696
Feb ’20
Reply to databaseScope lead to dyld: Library not loaded on xcode13-beta with simulator 14.5
Not an answer I’m afraid, but perhaps a related problem. They’ve definitely changed something deep at the OS level which is even affecting the CloudKit syncing of apps built with the iOS 14 SDK many months ago (ie. my app!) if run on an iOS 15 device, let alone apps built with the iOS 15 SDK! This failure of syncing started to occur when iOS 15 beta 4 was released - prior to this it was all working normally, as it did in iOS 13 & iOS 14. From beta 4 the entire structure of the console log outputs for NSPersistentCloudKitContainer changed, so something fundamental changed with CloudKit at this time. In my case, it seems it has trouble syncing Core Data relationships and NSPersistentCloudKitMirrorringDelegate gets stuck in a loop causing CPU & RAM consumption to rise uncontrollably, with the OS killing the app shortly afterwards. No syncing occurs. My Core Data structure has not changed since iOS 14 and my app synced (and still does) just fine on iOS 14 devices. Other than a reply from a ‘Frame
Sep ’21
CoreData changes made aren’t showing in Data in CloudKit Dashboard
i am using NsPersistentCloudkitContainer with CoreData and CloudKit to manage my database. When I save data to the managedObjectContext I see my data model ‘Post’ added in Schema as a Record Type in the CloudKit Dashboard , but when I go to the Data section I still don’t see any data added. can anyone help why this is happening?
0
0
450
Jul ’20
Reply to CloudKit and CoreData public database
More info: I have experimented with code similar to yours to initialize two CloudKit schemas with one single request on the single NSPersistentCloudKitContainer instance. It does indeed work, however,there are limitations with the Xcode schema designer which render the results, effectively useless. The problems start when you create multiple configurations in your schema model, that are declared to be used with CloudKit. The schema designer has no knowledge of container identifiers, nevermind multiple container identifiers. I discovered that as soon as I added a new CloudKit backed configuration and added a single new entity to it with zero relationships, my project no longer compiled. Xcode told me that I had to add the entities from the other CloudKit backed configuration to this new configuration with it's single isolated entity. Bizarrely, it never instructed me to add the new isolated entity to the previous CloudKit configuration. It was complaining about relationships in the older CloudKit conf
Topic: App & System Services SubTopic: Core OS Tags:
Aug ’19
How to Delete Tips from CloudKit?
Hi! I use Tips with CloudKit and it works very well, however when a user want to remove their data from CloudKit, how to do that? In CoreData with CloudKit area, NSPersistentCloudKitContainer have purgeObjectsAndRecordsInZone to delete both local managed objects and CloudKit records, however there is no information about the TipKit deletion. Does anyone know ideas?
2
0
436
Mar ’25
Extreme increase in app storage size after enabling CloudKit
I have a SwiftData flashcard app which I am syncing with CloudKit using NSPersistentCloudKitContainer. While syncing itself is working perfectly, I have noticed a dramatic increase in the app size after enabling sync. Specifically, without CloudKit, 15k flashcards results in the default.store file being about 4.5 MB. With CloudKit, default.store is about 67 MB. I have inspected the store and found that most of this increase is due to the ANSCKRECORDMETADATA table. My question is, does implementing CloudKit normally cause this magnitude of increase in storage? If it doesn’t, is there something in my model, schema, implementation, etc. that could be causing it? Below are two other posts describing a similar issue, but neither with a solution. I replied to the first one about a month ago. I then submitted this to Developer Technical Support, but was asked to post my question in the forums, so here it is. Strange behavior with 100k+ records in NSPersistentCloudKitContainer Huge increase in sqlit
2
0
128
1w
Posts Sample Application for 'Using Core Data with CloudKit'
The session Using Core Data with CloudKit (https://developer.apple.com/videos/play/wwdc2019/202/) spoke of a sample app for demonstrating the new NSPersistentCloudKitContainer and how it ties Core Data and CloudKit together. I didn't see it listed with the session resources; has it been uploaded somewhere else? If not, when can we expect the sample application to be posted?
2
0
2.2k
Jun ’19
Display name for CloudKit container in the "Manage Storage" view of Settings
How can I set the display name of the CloudKit container in Settings -> iCloud -> Manage Storage. I have multiple containers, some legacy, and some for certain modules that are shared among a suite of apps. The problem is all Containers show the same name so it is not possible to advise a user which containers are safe to delete. I am using NSPersistentCloudKitContainer.
1
0
294
Nov ’24
What does "Allows External Storage" checkbox in the Attribute Inspector do?
For a bit of context, I store binary files of about 50KB in my Core Data. I noticed that enabling the Allows External Storage option doesn't seem to make any difference. Additionally, how does this setting work with CloudKit when using NSPersistentCloudKitContainer? Does this setting affect how the data is loaded into memory when accessed in Core Data in the app? Thank you very much!
1
0
692
Jun ’24
Coredata and CloudKit not synchronized
1/ Signing & capabilities background mode - > remote notification cloud -> cloudkit @ container created 2/ coredata ->used with cloudkit & all attributes are optionals 3/ appDelegate NSPersistentCloudKitContainer viewContext.automaticallyMergesChangesFromParent = true AND it's not working on my two devices (iPhone & iPad) under iOs 15.0.2 What did I forget?
2
0
861
Oct ’21
PersistenceController and CloudKit
Hello I am making a To-Do list app where I use CoreData and CloudKit, the problem is that when I added this line of code container.persistentStoreDescriptions = [NSPersistentStoreDescription(url: fileContainer.appendingPathComponent(MJ.sqlite))] to the PersistenceController, iCloud syncing stopped working. (I need that line of code in order to permit to extensions to access the CoreData database) Any idea to solve the problem? This is all the PersistenceController code struct PersistenceController { static let shared = PersistenceController() let container: NSPersistentCloudKitContainer init(inMemory: Bool = false) { container = NSPersistentCloudKitContainer(name: MJ) guard let fileContainer = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: group.name) else { fatalError(Shared file container could not be created.) } container.persistentStoreDescriptions = [NSPersistentStoreDescription(url: fileContainer.appendingPathComponent(MJ.sqlite))] container.loadPersistentStore
3
0
2.5k
Aug ’21
Advice on sharing data between apps NSPersistantCloudkit container or App groups or both?
I have several different apps that I'd like to share a personal core data store with on the same device and across devices. I've been experimenting with NSPersistentCloudKitContainer, which seems to work, but it can take a while to sync and it's not clear when it has. I have also experimented with using app groups where the SQLite file is placed in the app group so that changes are immediately available to other apps on the device. My question is whether it is better to do one or the other or both. Will two apps open on the same device accessing the shared SQLite cause conflict issues? Do I even need to sync data with cloudKit if I'm already syncing with a shared group? Using NSPersistentCloudKitContainer alone means that each app will be syncing its own copy of the data locally, which doesn't seem very efficient and again I don't know if it's synched when I open the other app up. But I have seen conflicts when i have both apps open at the same time. Is there a foolproof way to prevent confl
0
0
702
Jun ’22