Questions tagged [nspersistentcloudkitcontainer]

111 questions
2
votes
1 answer

CoreData & CloudKit toggle iCloud sync (enable/disable)

Since my last question (here toggle between local and iCloud CoreData store) I was able to make a lot of progress. I am switching between NSPersistentCloudKitContainer and NSPersistenttContainer But... When I switch off the CloudKit synchronization…
2
votes
0 answers

CloudKit integration requires that the value transformers for transformable attributes are available via +[NSValueTransformer valueTransformerForName:

I'm using CoreData+CloudKit to store data, currently there are two Entities,AEntity and BEntity: In AEntity, there is an attribute: content, used to store NSAttributedString, its Type is "Transformable", I set its "Transformer" to…
2
votes
0 answers

Detecting that a user's CloudKit storage quota has been reached - NSPersistentCloudKitContainer

When a user's CloudKit allocations is full, sync between their devices stops working. This is fairly common considering the 5GB default. Unfortunately detecting it on the app side isn't as straightforward as one might hope. Can someone suggest a…
0o0
  • 31
  • 6
2
votes
0 answers

Very slow sync of CoreData + CloudKit on WatchOS

Setup: I have a watch app that is not independent, but cooperates with the companion iOS app. Both use CoreData + CloudKit, and the size of the data stored in iCloud is very little (a few hundred records, where each record has 0.5 kB). The iOS app…
Reinhard Männer
  • 14,022
  • 5
  • 54
  • 116
2
votes
0 answers

how to use NSPersistentCloudKitContainer.eventChangedNotification

Hi I am trying to get event notification from NSPersistentCloudKitContainer to get notification if data change or not? NSPersistentCloudKitContainer.eventChangedNotification but I didn't find any simple example how to use it. doesnt any know to…
2
votes
1 answer

Core Data database wiped when using NSPersistentCloudKitContainer

I currently have an application that uses Core Data with Apple's NSPersistentCloudKitContainer and I've a 2 users mentioning they lost their data when updating the app - I'm using Lightweight migrations, and the only factor they have in common is:…
2
votes
2 answers

Migrating existing app from NSPersistentContainer to NSPersistentCloudKitContainer

I have an app that uses local device only CoreData (NSPersistentContainer). I am looking to migrate so the app is compatible with NSPersistentCloudKitContainer. I understand all the CloudKit setup for NSPersistentCloudKitContainer, but how do I…
2
votes
1 answer

Lightweight CoreData Migration with CloudKit

Does Core Data handle simple data-model additions like a new attribute w/out any further "help" from me? In my case, I have an app that uses Core Data for varius things related to a users profile. I have an existing data-model entity called Profile…
2
votes
0 answers

Released Mac Catalyst app uses wrong Core Data database

I released an iOS + Mac Catalyst app that uses Core Data and NSPersistentCloudKitContainer. No issues for the users, but something is wrong for me when installing the app from the Mac App Store: it not only uses the development database instead of…
2
votes
0 answers

Core Data and CloudKit integration issue when renaming relationship (code 134110)

I currently have an app using Core Data in the App Store: the app allows people to record their water and sailing activities (think of it like Strava for sailors). I have not updated the app for 3 years, the app seems to be still working fine on…
2
votes
1 answer

Is creationDate accessible through NSPersistentCloudKitContainer?

In the Cloudkit Dashboard, I can see a Created time for the record. However, in my app when i use NSSortDescriptor(key: "creationDate", ascending: false) I get an error: , keypath creationDate not found in…
2
votes
1 answer

Querying Cloud Kit Core Data Record

I have a app that I'm trying to migrate over to using CloudKit to store the core data so it can be synced across devices. The syncing is working fine, the issue I'm having is that the app adds some initial data to the database, this is causing it to…
Ceri Turner
  • 830
  • 2
  • 12
  • 36
2
votes
1 answer

How to add a parent to CKRecord before NSPersistentCloudKitContainer will sync it?

NSPersistentCloudKitContainer automatically creates all CKRecords for NSManagedObjects, so... How to get access to this process and set CKRecord.parent before changes will be synched. I need each CKRecord of type B to have parent record of type A,…
bodich
  • 1,708
  • 12
  • 31
2
votes
1 answer

How to pre-load Core Data SQLite files with NSPersistentCloudKitContainer

I have a Core Data+CloudKit configuration where I need to provide the user with some initial data as a starting point. It's only a few records/objects so at first I tried hardcoding the data and writing to Core Data on first launch. Users are then…
tkhelm
  • 345
  • 3
  • 14
2
votes
1 answer

NSPersistentCloudKitContainer written to by multiple processes

I have an app using iCloud and Core Data through NSPersistentCloudKitContainer. The container and related code are in a shared framework and most things are running fine. In addition to the app itself, I have a share extension and an intents…