Skip to main content
Filter by
Sorted by
Tagged with
Best practices
0 votes
1 replies
89 views

I have a model class in my app which uses SwiftData / CloudKit: @Model final class Project { var name: String = "" var avatarData: Data? var hasAvatar: Bool = false ... ...
Ser Pounce's user avatar
  • 14.4k
Best practices
0 votes
1 replies
76 views

I’m working on an iOS app using Core Data with CloudKit synchronization (NSPersistentCloudKitContainer). In my Core Data model, I have defined relationships between entities (e.g. 1:n and n:m). These ...
Miracle Johnson's user avatar
0 votes
0 answers
46 views

I am building an iOS 26 SwiftUI app with Swift 6 strict concurrency using NSPersistentCloudKitContainer with a private and shared store for CloudKit zone-based sharing. The goal I want to share a Core ...
LevelOne2k's user avatar
2 votes
0 answers
29 views

We’re using a private database with a custom zone. Record types and related schema are created programmatically rather than through the dashboard. When running the app in the development environment, ...
ArgBat's user avatar
  • 53
0 votes
0 answers
57 views

For an unknown reason, when I delete a record in my app, the CloudKit record does not delete. So the next time the app runs, the "deleted" records come back. I add the records as follows: ...
Ferdinand Rios's user avatar
0 votes
0 answers
80 views

I'm using NSPersistentCloudKitContainer and I have added an entity (to the private database) to the core data model. Now I have realised that I don't need that entity anymore and I want to get rid of ...
Peter Warbo's user avatar
3 votes
2 answers
87 views

I'm using Swift5 and SwiftUI making an app that based on CloudKit. I've made the merge data from iCloud function and it looks work well. But I always get a warning like "Capture of '...
Qixiny's user avatar
  • 112
Best practices
0 votes
2 replies
107 views

In SwiftData / CloudKit, when you have a root model object, it's pretty straightforward when you want to add or delete it from the model: simply use a modelContext variable and use its insert and ...
Ser Pounce's user avatar
  • 14.4k
Advice
0 votes
2 replies
136 views

Let's use a basic todo app as an example - sharing a todo list. I have a share button (square with up arrow) that when the user taps I want the initial share sheet to appear. If I have to create and ...
Cocoanut's user avatar
  • 664
0 votes
1 answer
88 views

The operation: operation.recordMatchedBlock = {recordID, result in switch result { case .success(let record): print("RecordID: \(recordID), record: \(record)") let ...
Valentine's user avatar
6 votes
1 answer
108 views

I've been trying to get the server to server request for quite some time, but unfortunately I keep getting this error: 2025-11-19T03:19:29Z:"mybody":/database/1/"mycontainer"/...
Valentine's user avatar
0 votes
0 answers
68 views

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 ...
SwiftWarrior's user avatar
  • 1,464
2 votes
1 answer
118 views

I’m building a SwiftUI app that integrates with iCloud Drive. The goal is for the app’s Documents folder to appear in the user’s iCloud Drive, just like other apps that expose their folders. I have ...
markb's user avatar
  • 1,409
1 vote
0 answers
103 views

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 ...
kachmashk's user avatar
0 votes
1 answer
108 views

This is a warning I had when trying to use UICloudSharingController with preparationHandler: Use -[UIActivityViewController initWithActivityItemsConfiguration:] and pass it a ...
kunass2's user avatar
  • 62k
3 votes
1 answer
209 views

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 ...
Antifonic's user avatar
  • 907
0 votes
0 answers
112 views

Background: My app successfully uses CloudKit syncing, and syncing works reliably in general. I'm using multiple .xcconfig files to distinguish between Debug and Release builds. These define ...
appfrosch's user avatar
  • 1,476
0 votes
2 answers
181 views

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 ...
Ser Pounce's user avatar
  • 14.4k
1 vote
0 answers
115 views

I have an iOS app that uses CloudKit to allow users to share data with other users through iCloud. One user joins another user's record through the shareURL from a CKShare created by the record owner, ...
gohnjanotis's user avatar
  • 7,776
0 votes
0 answers
81 views

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'...
FE_Tech's user avatar
  • 1,832
1 vote
1 answer
164 views

The app I'm working on aims to show its users one unique Item per day. The Item has an associated ItemText and ItemImage. All Items are created when the user installs the app (see the create() ...
zkvvoob's user avatar
  • 506
0 votes
0 answers
39 views

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 ...
user14341201's user avatar
0 votes
1 answer
58 views

I need to know the source of the changed coredata objects returned from NSManagedObjectContextObjectsDidChange. I have some shared objects, and want to send a notification if the source is other than ...
Elijah's user avatar
  • 8,660
0 votes
0 answers
19 views

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. ...
vrao's user avatar
  • 715
0 votes
1 answer
68 views

I have setup push notifications and updates in CK are updating UI well. The issue I have is Syncing between Core Data and CK. It's set to use NSPersistentCloudKitContainer with ...
drewglew's user avatar
  • 148
0 votes
0 answers
62 views

Is it possible to programmatically create a shared iCloud Drive folder and then generate a link for external users to access it? For instance, myApp utilizes iCloud Drive for storing certain files. ...
Philipp's user avatar
  • 347
0 votes
1 answer
274 views

I wasn't sure how to phrase the question. I know it's misleading. Context: I'm using NSPersistentCloudKitContainer for my public and private database. The CoreData model has two configurations: Local, ...
Jonathan's user avatar
  • 2,383
1 vote
1 answer
215 views

In a CloudKit private database, the Owner creates a custom zone and performs the following actions: Creates CKRecord1 with CKShare1 and invites Participant1 to it. Creates CKRecord2 with CKShare2 and ...
user2138912's user avatar
  • 1,698
0 votes
0 answers
96 views

In my app, I have a class called Project: import Foundation import SwiftData @Model class Project { @Relationship(deleteRule: .nullify, inverse: \ProjectType.projects) var projectType: ...
Ser Pounce's user avatar
  • 14.4k
0 votes
1 answer
95 views

I want to pre-populate the user's database the first time the app is used. This is what I have: func checkAndPopulateData(modelContext: ModelContext) { let fetchRequest = FetchDescriptor<...
ixx's user avatar
  • 32.3k
1 vote
0 answers
82 views

Here is my sample code of integration with iCloud let dbName = "GroceryItem1" let fieldName = "todoTitle1" @objc func saveItem(name: String) { let record = CKRecord(...
BraveEvidence's user avatar
3 votes
1 answer
105 views

today I encountered a strange error that’s blocking my progress. I wanted to add CloudKit support to an app that’s already using SwiftData for saving data. I read that 'All properties must either have ...
miltenkot's user avatar
  • 339
1 vote
0 answers
67 views

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 ...
Ozgur Baykal's user avatar
2 votes
0 answers
77 views

My App requires that the user has and allows iCloud access. With that access I expect to be able to access the users name. Yet, the following code produces an empty nameComponents result from ...
GoZoner's user avatar
  • 70.8k
0 votes
1 answer
615 views

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. ...
Rob Stearn's user avatar
1 vote
1 answer
277 views

I have an app that uses SwiftData which is set to be synced with iCloud. When I run the app in the simulator and on an actual device simultaneously and then amend the customer name on the simulator ...
Mgwd's user avatar
  • 564
1 vote
0 answers
80 views

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 ...
rayx's user avatar
  • 1,810
0 votes
1 answer
122 views

In my app (which utilizes SwiftUI, SwiftData and CloudKit), I have the following class and enum: @Model class CategoryType { var name: String = "" var parameterType: ...
Ser Pounce's user avatar
  • 14.4k
0 votes
1 answer
294 views

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 ...
Francesco Papagno's user avatar
1 vote
1 answer
229 views

I'm developing an app using SwiftData and CloudKit that presents the user with a selectable List of movie genres to choose from, populated from an enum and another array of objects (more on this in a ...
Ser Pounce's user avatar
  • 14.4k
0 votes
0 answers
147 views

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 ...
dub's user avatar
  • 511
0 votes
1 answer
55 views

App crashed showing error index out of range. In cloudkit dashboard, querying the table showed half of the records missing. No changes were made neither to the app nor the database since the last ...
nixxe's user avatar
  • 1
1 vote
0 answers
78 views

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: ...
Ser Pounce's user avatar
  • 14.4k
1 vote
0 answers
547 views

I'm developing an iOS app (for iPhone and iPad) with a watchOS companion app using SwiftData and iCloud. I've set up the following: SwiftData model with optional/default parameters iCloud capability ...
Çağla Aksoy's user avatar
1 vote
0 answers
105 views

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 “...
Alistair Cooper's user avatar
-1 votes
1 answer
109 views

For some reason when I add an @Query macro to my child view it fails to render. If I simplify my child view by just adding a plain text field while still leaving the @Query macro it still won't render....
SeniorDeveloper's user avatar
1 vote
1 answer
465 views

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 ...
Ser Pounce's user avatar
  • 14.4k
0 votes
1 answer
197 views

For a book club app I'm writing In SwiftUI, I have a NavigationSplitView that has a selectable List on its leading column. The first item on the list is "Book" and will take the user to a ...
Ser Pounce's user avatar
  • 14.4k
2 votes
0 answers
143 views

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 ...
MatFetsch's user avatar
1 vote
0 answers
827 views

I have an iOS project with CloudKit, Background, and Remote Notifications enabled. I have specified an @Model type that matches the name of the record in the CloudKit database. But when I created the @...
Scott McKenzie's user avatar

1
2 3 4 5
48