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
9
votes
2 answers

Multiplatform MBaas similar to CloudKit?

I need to implement my CloudKit based app in Android too. Which MBaas has the most similar architecture like CloudKit? I need these features: cascade deletes able to track insert / update / delete changes in tables up from a date represented with a…
János
  • 32,867
  • 38
  • 193
  • 353
9
votes
3 answers

Are public database subscription notifications received by all users with the same subscription?

I have set up a CKSubscription* so that I receive changes to a record type. I'm using the public database. When I test with the same user (same iCloud account) I receive the notification. If I use a different user (different iCloud account) I don't…
Vamos
  • 2,701
  • 2
  • 24
  • 37
9
votes
2 answers

iCloud Account Not Supported In iOS Simulator?

I am trying to test my iOS app that uses the CloudKit APIs with the simulator. When I try to log in with my iCloud credentials it says, Device Not Supported Your Apple ID is valid, but this iPhone is not qualified for iCloud. According to Apple's…
Addison
  • 549
  • 5
  • 11
9
votes
4 answers

Cloudkit dashboard unexpected server error

When I want to use Cloudkit, I found that I can't manage the data by Cloudkit dashboard. The page tips me a message "Unexpected server error". How can I solve this problem? Here shows this error screenshot. [Update] Full error log: ERROR TITLE…
9
votes
1 answer

CloudKit does not work with Simulator

Recently I've been having trouble getting the iOS Simulator to work with the records I've made in the CloudKit Dashboard. The interesting thing is that it works with a real device, but not with the simulator. CloudKit Dashboard says that it is a…
Jaun7707
  • 119
  • 2
  • 9
9
votes
3 answers

CloudKit subscription sometimes does not work

If I try subscribe to CloudKit with this code: NSPredicate *truePredicate = [NSPredicate predicateWithValue:YES]; CKSubscription *itemSubscription = [[CKSubscription alloc] initWithRecordType:RecordType …
Mikhail S
  • 3,338
  • 3
  • 21
  • 34
8
votes
1 answer

NSPersistentCloudkitContainer Memory Leak -> Crash? (iOS 15 beta 4, 5, 6 & 7...)

This is a copy of a thread I've created on Apple's Forum here Background I have an established app in the App Store which has been using NSPersistentCloudKitContainer since iOS 13 without any issues. I've been running my app normally on an iOS…
Paul Martin
  • 699
  • 4
  • 13
8
votes
1 answer

How to prune history right in a CoreData+CloudKit app?

My app uses CoreData with iCloud as backend. Multiple devices can access the iCloud database which is thus .public. The local CoreData store is synchronized with iCloud using an NSPersistentCloudKitContainer. I use history tracking according to…
Reinhard Männer
  • 14,022
  • 5
  • 54
  • 116
8
votes
2 answers

Registering to receive notifications of remote CloudKit changes not working

I have just finished setting up CoreData+CloudKit using the new iOS 13 NSPersistentCloudKitContainer. It works really nicely in that I can use auto-generated CoreData classes for property access and local storage, and the…
mashers
  • 1,009
  • 7
  • 22
8
votes
2 answers

UICloudSharingController shows infinite activity indicatory in Xcode 11

I have the following code to import the UICloudSharingController into swift UI but when integrated the first time up it just shows an activity indicator that never stops and then the second time it is presented (via .sheet), there is no activity…
Congruent Tech. UG
  • 1,408
  • 2
  • 12
  • 21
8
votes
3 answers

userDidAcceptCloudKitShareWith not being called

func application(_ application: UIApplication, userDidAcceptCloudKitShareWith cloudKitShareMetadata: CKShare.Metadata) {...} does not get called after clicking "OK" on the link to a shared cloudkit record. The app will open, but this function…
Eamonn
  • 161
  • 2
  • 7
8
votes
1 answer

Synchronising old data with NSPersistentCloudKitContainer

I'm using NSPersistentCloudKitContainer to synchronise data between different devices with CloudKit. It works perfectly well with a new project, however when I'm using it with old projects the old data which was added with NSPersistentContainer does…
Wojtek
  • 1,006
  • 11
  • 30
8
votes
2 answers

Codable to CKRecord

I have several codable structs and I'd like to create a universal protocol to code them to CKRecord for CloudKit and decode back. I have an extension for Encodable to create a dictionary: extension Encodable { var dictionary: [String: Any] { …
Alexey Chekanov
  • 1,047
  • 14
  • 25
8
votes
2 answers

CloudKit: Delete local objects based on CKQueryNotification

I'm building an app that heavily relies on CloudKit for data synchronization. Each time the app launches, it catches up with all changes that have been made on the server using a CKFetchNotificationChangesOperation. This successfully returns all…
Joris416
  • 4,751
  • 5
  • 32
  • 59
8
votes
2 answers

Get all push notifications received since app was last open

I'm creating an iOS 10 app using Xcode 8 and CloudKit. When the app loads, is there any way to read all push notification that have been sent since the last time the app was running?
liam923
  • 991
  • 1
  • 10
  • 19