2,367 questions
0
votes
0
answers
7
views
CKQueryOperation get Array out of public database
at first the operation:
operation.recordMatchedBlock = {recordID, result in
switch result{
case .success(let record):
print("RecordID: \(recordID)...
0
votes
0
answers
44
views
macOS/iOS app CloudKit only syncs after app is force quite, or device is locked and unlocked
The core issue seems to be that while we receive CloudKit notifications and can access the data after app restart, the
NSPersistentCloudKitContainer doesn't seem to be processing remote changes in ...
1
vote
0
answers
66
views
Sync not working for independent watchOS app using CloudKit and SwiftData
I'm working on an independent watchOS app and I was looking for the best solution to persist data locally and have an online sync with the iCloud storage.
I've found out about the SwiftData which is ...
2
votes
0
answers
80
views
CloudKit remote notifications in macOS get clogged up
I have a macOS app which uses CloudKit. I'm trying to deliver remote notifications for database record changes, but I didn't get any notifications through.
I've set everything correctly and according ...
0
votes
2
answers
163
views
List won't update when item is deleted
I have two selectable lists, the first is populated with Category model objects and the second with Subcategory model objects (which are taken from selected Category value of the first list).
When I ...
0
votes
0
answers
61
views
How to allow Cloud Encryption in CoreData and CloudKit?
How to migrate if the following problem occurs?
The current Coredata and CloudKit database contains records which do not use allowCloudEncryption. Since we thought of advanced data protection for user'...
0
votes
0
answers
32
views
Is it possible to revert committed deletion from Core Data Cloudkit in Swift?
A user has accidentally deleted a root record that removes all data from the user. The data is stored in Cloudkit CoreData with Transaction History enabled.
I have noticed in the CoreData database ...
0
votes
0
answers
16
views
Cloudkit references do not reflect coredata relationships
In core-data I have a contact and location entity. I have one-to-many relationship from contact to locations and one-to-one from location to contact. I create contact in a seperate view and save it. ...
0
votes
0
answers
41
views
Cloudkit ckasset list only saving initial image
This function is meant to upload an image to a ckrecord that has a ckasset list field. It has worked up until recently. Now it works fine for saving the initial image, but I get the following error ...
0
votes
0
answers
54
views
CoreData/CloudKit 0xdead10cc
I’m getting a 0xdead10cc crash in a basic CoreData/CloudKit application. I only have one CoreData save call and it's made when the app is in the foreground and it's minor so I don't think it's being ...
0
votes
0
answers
47
views
How to fetch a shared instance of CKRecord? How to deal with the error “Only shared zones can be accessed in the shared Database”
Problem: When I try to fetch an accepted shared CKRecord from the shared database in CloudKit I unfortunately get this error -> Only shared zones can be accessed in the shared Database.
Solution ...
0
votes
0
answers
89
views
SwiftUI / SwiftData / CloudKit: how to make custom binding for dynamically changing setter value
In my app, I have a class called Project:
import Foundation
import SwiftData
@Model
class Project
{
@Relationship(deleteRule: .nullify, inverse: \ProjectType.projects) var projectType: ...
0
votes
0
answers
48
views
CoreData + CloudKit Sync Issues: Observed Context Saves and Skipped Migrations
I am using CoreData with CloudKit in my iOS app, and I have encountered a series of issues while syncing data. The logs show multiple context saves and migration skips, but there’s no clear indication ...
1
vote
0
answers
38
views
Why is data not encrypted on icloud.developer.apple.com when i am using encrypted field
Here is my sample code of integration with iCloud
let dbName = "GroceryItem1"
let fieldName = "todoTitle1"
@objc func saveItem(name: String) {
let record = CKRecord(...
0
votes
0
answers
110
views
Issues with Updating Widget Timeline Based on SwiftData/CoreData Changes in WatchOS App
I tried looking everywhere online and asked AI, but it seems none of the solutions resolved my issue. I am using CoreData or SwiftData with CloudKit to fetch data from the database. I created a simple ...
1
vote
0
answers
63
views
Silent push notifications not working on some iOS devices
I send APNs notifications to my devices with the CloudKit dashboard. I test with two devices;
Device with Silent Push Working Successfully:
iOS version 16.5.1 (c), Model iPhone Xs
Silent Push Failed ...
0
votes
1
answer
467
views
SwiftData issue adding model objects when syncing to CloudKit
I'm building a simple app that persists data using the SwiftData framework with the additional capability of syncing through CloudKit across devices.
All was well until I added a second model object. ...
1
vote
0
answers
77
views
Does CloudKit guarantee CKRecord.Reference is always valid?
I'm considering using CloudKit in my app (it doesn't use Core Data) and have read as many materials as I can find. I haven't fully grasped it yet and have a basic question on CKRecord.Reference. Does ...
0
votes
1
answer
240
views
How to handle data migration when using CloudKit?
General problem
I have an iOS app which uses Core Data with CloudKit and I reached the point where I need to evolve the schema and migrate existing data.
Schema changes
What I need is adding a new ...
0
votes
0
answers
135
views
How to cache CKRecords efficiently in SwiftUI
I'm building a SwiftUI social photo-sharing app that uses CloudKit, where user profiles (including a CKAsset for profile pictures) are displayed throughout the app. To reduce redundant fetching of ...
1
vote
0
answers
77
views
Why is an implicitly set relationship property crashing when I'm trying to access it? [duplicate]
I'm using SwiftData with CloudKit and I have the following two classes:
@Model
class Category
{
@Relationship(deleteRule: .cascade, inverse: \Book.category) var books : [Book]?
var project: ...
1
vote
0
answers
89
views
Do You Need 2 Bundle Ids and 2 Targets to Use Swift Data and CloudKit for Dev and Prod?
I’m using Swift Data and CloudKit, with a private container.
When developing my understanding is that you should have a target with com.apple.developer.icloud-container-environment key set to “...
1
vote
1
answer
356
views
How to solve relationship issues with SwiftData / CloudKit?
I have the following model set up in my app which utilizes SwiftData and Cloudkit. A Project object has an array of Book objects. A Book object has an array of Reader objects. A Reader object has an ...
1
vote
0
answers
117
views
SwiftData migration with iCloud and multi-device support
I’m writing test apps using SwiftData. Running migrations locally works fine. But I couldn’t find anything on how to handle a situation, where my local app is running on e.g. ‘MigrationSchemaV2’ and ...
0
votes
1
answer
100
views
Does the Apple CloudKit dashboard only show developer data?
I am creating an iOS app.
I saved the data using Realm, but I found CloudKit while I was looking into it because I thought there were many inconveniences with the backup.
I understand that CloudKit ...