Questions tagged [nspersistentcloudkitcontainer]

111 questions
0
votes
1 answer

Apple rejects my app due to crash in CoreData integration file but can't reproduce

I developed an app using CoreData and CloudKit. It gives some warning message in the console but works with no problem. However Apple rejected due to crash which I could not replicate. Really appreciate if you could advise how to address the issue.I…
0
votes
1 answer

CoreData + CloudKit share broken after stop sharing

I'm having a hard time managing a shared core data object. I'm hoping that I'm doing something wrong and it's not just a bug in the cloudkit sharing but I also tried it with a sample app from apple with the same issue. Here's what I'm doing: When…
0
votes
1 answer

iOS - CoreData CloudKit sharing - participants adding children

I have implemented sharing of items from my Core Data store, using the NSPersistentCloudKitContainer api, with limited success. The objects I share (a TripsLog) have child objects (Trip), which appear on participants' devices. I've implemented more…
SomaMan
  • 4,127
  • 1
  • 34
  • 45
0
votes
0 answers

When and how often should initializeCloudKitSchema be called?

I am using NSPersistentCloudKitContainer in my Application, and I am struggling to understand when and how often should I call the method initializeCloudKitSchema() of my container. Do I understand correctly that this is something to use in…
0
votes
1 answer

NSPersistentCloudKitContainer & persisting Core Data after removing a share

I'm using NSPersistentCloudKitContainer to sync CoreData+Cloudkit. I am basing my code on Apple's example in the code downloaded (see reference below). My Core Data root record is a hierarchy (list with children items on the list). I have assumed…
DIV
  • 223
  • 1
  • 2
  • 11
0
votes
0 answers

CloudKit fetch Operation recordMatchedBlock isn't working

Im trying fetch records from my private CloudKit DB.I could able to fetch the record.I stucked in accessing the fetched record func ReadRecord() { let predicate = NSPredicate(format: "name = %@", "samsung") let query = CKQuery(recordType:…
0
votes
0 answers

How do I retrieve CloudKit Reference List?

I have setup my CloudKit record types the same as my local structs and models in my code but can't seem to find a way to retrieve the list of references. For example, I have a UserData record type with a record field of friends which is a list of…
Papi
  • 255
  • 1
  • 2
  • 13
0
votes
1 answer

I use NSPersistentCloudKitContainer to sync with iCloud, in debug works but installing from TestFlight no

I use NSPersistentCloudKitContainer to sync with user iCloud the data, it works perfectly installing through Xcode on device but when install from TestFlight it doesn't work at all seems there is Production environment but I don't know how to pass…
Steven
  • 762
  • 1
  • 10
  • 27
0
votes
1 answer

Is it necessary to use merge policy with CoreData and Allows external storage to avoid crash?

I use CoreData + NSPersistentCloudKitContainer to backup my model. One of my NSManagedObject has a picture stored as Binary Data and Allows external storage checked. It's very random but sometimes when i call context.save() i get a merge conflict…
0
votes
1 answer

Handling CKErrors while using NSPersistentCloudKitContainer

I have an app that uses Core Data, works great. I decided to try to use iCloud to sync data across multiple devices. I followed the basic steps of changing NSPersistentContainer to NSPersistenCloudKitContainer and adding iCloud capabilities,…
0
votes
0 answers

watchOS/CloudKit and background sync

I'm working on an Swift App which runs on iOS, macOS and watchOS (Xcode) using CloudKit (see code for the initialization of the CloudKit-Persistency-Container below). The app works great: the data gets synced via iCould on all devices. My problem:…
0
votes
1 answer

CloudKit bytes to array of strings

I have a record on my CloudKit public database that was made via the NSPersistentCloudKitContainer. In Core Data, the attribute is of type [String] and when I add it to the public database, it is converted to Bytes. When I fetch this record and try…
0
votes
0 answers

Query regarding syncing data across iPhones or iDevices for a user

I have a photo album app that uses core-data. As of now it does not utilise login nor do I plan to. My requirement is that the album should sync across a user's multiple iDevices. I was watching https://developer.apple.com/videos/play/wwdc2019/202/…
0
votes
1 answer

How to read arrays with NSPersistentCloudKitContainer (CloudKit with Core Data)?

I have [String] and [Int] attributes in my entity on Core Data/type on CloudKit, where they are String list and Int64 list respectively. I'm trying to synchronize them via NSPersistentCloudKitContainer (public server). All other attributes…
0
votes
1 answer

iCloud Sync does work on iPhone & Mac but not on iPad

I have found a strange problem with iCloud Sync. Situation: I have developed an iOS, iPadOS & macOS App using SwiftUI. All three Versions share the same Codebase (macOS Version is a Catalyst iPad Version). The Project does support iCloud Sync via…