Questions tagged [cloudkit]

CloudKit is a framework for storing and retrieving data on Apple’s iCloud servers. Queries can be run against structured records on the server, and assets provide for large data storage. The public database provides shared storage for web-style apps, and the private database provides storage for user-specific data. CloudKit also provides a user identity so that an iCloud account can be used for sign-in for your app.

CloudKit

CloudKit is a framework for storing and retrieving data on Apple’s iCloud servers. Queries can be run against structured records on the server, and assets provide for large data storage.

The public database provides shared storage for web-style apps, and the private database provides storage for user-specific data.

CloudKit also provides a user identity so that an iCloud account can be used for sign-in for your app.

CloudKit is a transfer mechanism rather than a full sync solution, but it can be used to build custom syncing solutions.

Resources

2317 questions
0
votes
1 answer

CloudKit Sync using private database. Works in development, but not in production

I have just added CloudKit to my app to sync my CoreData database between devices. It works great when pointing to Development. It creates all the records from my CoreData database in the private container on CloudKit. When I change it to point to…
Elijah
  • 8,381
  • 2
  • 55
  • 49
0
votes
0 answers

coredata cloudkit sync predicate

I'm not sure if this is possible but hope that it is. My app is more complicated that this example, so I'm using this to explain. The iOS app offers e-books and stories which are organized by library, so a user can subscribe to a library CKShare and…
Russ
  • 467
  • 3
  • 10
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
0 answers

How can I get current user's email and full name when signed in with Apple?

I have implemented Sign in with Apple in my app, and I am caching the user's ID(which is a generated UUID().uuidString) and the user's email and full name in UserDefaults. Let's say the UserDefault values get deleted. The user still remains signed…
vladponcea
  • 35
  • 3
0
votes
0 answers

Is Private the default CloudKit database while in TestFlight

I'm beta testing an app in TestFlight. I thought I had set things up so that all data would be stored in the Public Database in my CloudKit container (which I deployed to Production). But all records are going to the Private Database. Is this the…
Hyoryusha
  • 175
  • 1
  • 11
0
votes
1 answer

Strange behavior in SectionedFetchResults causes sort order to randomly jump

I have an iOS app that uses core data and CloudKit. The data model is simple and it contains a date and a string element that stores the date formatted as EEEE, MMM d yyyy. When I run a SectionedFetchRequest and display the results in a list, after…
Aleph
  • 465
  • 2
  • 12
0
votes
0 answers

Can’t get NSSharingServicePicker to work for sharing a CKShare

I’m trying to share CKRecords from my app’s CloudKit database using a CKShare from an NSSharingServicePicker, but the picker doesn’t show any sharing services. I’m pretty much doing exactly what the code samples in the WWDC22 video Enhance…
Marco Masser
  • 1,076
  • 1
  • 8
  • 14
0
votes
0 answers

How do I limit the number of times a user can perform an action in Swift using CloudKit?

I'm trying to limit the number of times a user can perform an action in a month. I understand that storing a counter in NSUserDefaults is low security as the user can easily go in and modify the stored variable, which I want to avoid. Since I don't…
cyril
  • 3,020
  • 6
  • 36
  • 61
0
votes
0 answers

How do I, in iOS 16.1.2, restrict access to the participants of a share to be able to be changed by only the owner of the share?

How do I implement UICloudSharingController so that in iOS 16.1.2, only the owner of the share can add or remove participants of the share, with the exception that a participant can remove himself from the share. When I set availablePermissions to…
daniel
  • 1,446
  • 3
  • 29
  • 65
0
votes
1 answer

CloudKit - be notified when all data has been fetched

I'm trying to connect my app to CloudKit to save a copy of the user's data online. However when we test with a new install, I want the app to wait until it has downloaded all necessary data from the cloud before deciding which screen to show…
theDuncs
  • 4,649
  • 4
  • 39
  • 63
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 allUserIdentitiesFromContacts() failing due to too many requests (http 429)

I'm making a simple call to fetch all app users in contacts: let userIdentities = try await CKContainer.default().allUserIdentitiesFromContacts() which fails with the message: Request failed with http status code 429 HTTP 429 is the code for too…
Ashley Mills
  • 50,474
  • 16
  • 129
  • 160
0
votes
0 answers

Core Data+CloudKit not Syncing or Connecting to CloudKit

I followed the documentation for adding CloudKit to my existing project as described at Setting Up Core Data with CloudKit. After running the project on two different simulators I noticed that it was not syncing. This led down a rabbit trail of…
Medicine Man
  • 81
  • 2
  • 10
0
votes
0 answers

CoreDataStack loadPersistentStores no completionHandler callback

In the past few weeks, about Coredata, I added the database backup function. After going online, I received feedback from users that the app opened with a white screen and could not be started normally. By investigating the reason why the App cannot…
wanbo
  • 868
  • 9
  • 24
0
votes
0 answers

cloudkit ckmodifyrecordsoperation progress

iam using cloudkit for backup , what i do is inserting text into file and then upload it with ckmodifyrecordsoperation and i provide a ui to show the progress that return from the function completion handler , first time in upload, it takes it time…
black2000
  • 1
  • 1