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
11
votes
1 answer

Can you share data on CloudKit between different apps

I have a free and paid version of my app in the app store. I'm updating the app to share some public data using CloudKit. I'd like both the free and paid apps to share the same data. Firstly is it possible for two apps to share the same data with…
Mark Bridges
  • 8,228
  • 4
  • 50
  • 65
11
votes
2 answers

Field '___recordID' is not marked queryable

I try to download all record with a specific recordType that recordID is not matches with a certain one. But I get an error. Any idea? I thought I can mark as queryable only manually added fields.
János
  • 32,867
  • 38
  • 193
  • 353
11
votes
1 answer

Saving An Array Of Objects In CloudKit

I'm confused about how to best save an object that contains an array of other objects in CloudKit. Say I have a todo list app, which has different collections of items. How would I go about saving/fetching a whole collection of items? Would I have a…
William Robinson
  • 1,038
  • 17
  • 32
11
votes
2 answers

Am I able to use recordID.recordName in a CKQuery?

CKQuery doc says: Key names used in predicates correspond to fields in the currently evaluated record. Key names may include the names of the record’s metadata properties such as "creationDate” or any data fields you added to the record. What else…
János
  • 32,867
  • 38
  • 193
  • 353
11
votes
3 answers

Swift CloudKit SaveRecord "Error saving record"

I am trying to save a record to CloudKit but am getting an error. I had seen elsewhere that this was an issue that required knowing how to save but I can't get this to work. var database:CKDatabase =…
Bren Gunning
  • 390
  • 2
  • 4
  • 18
11
votes
3 answers

How to communicate results between NSOperation dependencies?

The new Cloud Kit framework uses NSOperation extensively for it's CRUD. The results of those operations are returned in blocks. For example: let fetchOperation = CKFetchRecordsOperation(recordIDs: [recordID1,…
Ward Bekker
  • 6,316
  • 9
  • 38
  • 61
10
votes
5 answers

Why relationship must be optional when using Core Data with CloudKit?

Below is one of the requirements to use Core Data with Cloudkit in Apple's doc: All relationships must be optional. Due to operation size limitations, relationship changes may not be saved atomically. Attempting to use an optional relationship…
rayx
  • 1,329
  • 10
  • 23
10
votes
1 answer

CloudKit Sync using NSPersistentCloudKitContainer in iOS13

I am using NSPersistentCloudKitContainer for my Core Data application. During testing, I checked that changes made on the device are sync to CloudKit within second. However, when I disabled iCloud on my device then re-enable immediately, all my…
ianq
  • 117
  • 2
  • 6
10
votes
2 answers

Save Multiple CKRecords At One Time Using CloudKit and Swift

Is it possible to save multiple CKRecord objects in one CloudKit operation using Swift? I know how to retrieve multiple records at once, using things like CKFetchRecordsOperation or even just a regular performQuery. I just realized that I am not…
Pierce
  • 3,148
  • 16
  • 38
10
votes
3 answers

How to properly send an image to CloudKit as CKAsset?

I have an image (UIImage and it's url too) and I'm trying to send it to CloudKit as a CKAsset but I'm having this error: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Non-file URL'. Here is the code: override func…
Pedro de Sá
  • 760
  • 6
  • 19
10
votes
1 answer

“Couldn't send a valid signature” error when using CloudKit without iCloud account

I have submitted an iOS app that uses CloudKit to Apple. It's being rejected because it requires user to sign into iCloud for access. Apple's reasoning is that even without iCloud sign-in, the public database is still readable. So that part of the…
Cakelly
  • 401
  • 3
  • 9
10
votes
2 answers

What is clientChangeTokenData in CKModifyRecordsOperation?

I am working on CloudKit sync in my app ("Tiny data, all devices" model, with a custom zone in the private database). CKModifyRecordsOperation contains clientChangeTokenData property of NSData type which is described in the docs as follows: When…
Rinat Khanov
  • 1,566
  • 10
  • 32
10
votes
1 answer

Is there a limit to the number of CKReferenced records in CloudKit?

I am trying to store groups of contacts in CloudKit, and I am getting an error back if I try to create a large group of records, CKReferenced to a single group record. The limit appears to be around 700 or so records. Has anyone else seen a…
Peter Johnson
  • 3,764
  • 1
  • 23
  • 27
10
votes
2 answers

CloudKit: free public storage and data transfer

I would like to understand the CloudKit free usage calculation, but I can't. Could anyone describe what 40 requests per seconds (10 per 100.000 users) are? I couldn't find any definition what a request is. If I had 2 apps and every app would ping…
DevAndArtist
  • 4,971
  • 1
  • 23
  • 48
10
votes
4 answers

Cloudkit: " error saving record WRITE operation not permitted"

I'm trying to save a record CloudKit but I'm getting the following error from cloudkit: error saving record este es error: Error saving record to server: WRITE operation not…
user2924482
  • 8,380
  • 23
  • 89
  • 173