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
10
votes
3 answers

Reset CloudKit Discoverability Permission

I'm testing code that requests discoverability via CloudKit: CKContainer.defaultContainer().requestApplicationPermission(CKApplicationPermissions.PermissionUserDiscoverability, completionHandler: { (status:CKApplicationPermissionStatus,…
Tom Harrington
  • 69,312
  • 10
  • 146
  • 170
10
votes
5 answers

CloudKit errors "Bad Container" (5/1014); "Couldn't get container configuration from the server for container "iCloud.com.abc.def"">

I am New to cloud Kit can someone Help me with Error , as i am trying to implement add a record in my Public Database and Getting this Error . "Bad Container" (5/1014); "Couldn't get container configuration from the server for container…
Alex A
  • 107
  • 1
  • 4
10
votes
4 answers

CloudKit: switch container environment from Development to Production

I'm building a test tool to verify content in CloudKit, but I want to be able to select the container's environment. On iOS, you can select either the "Development" or the "Production" environment when you export your app for ad hoc testing, but you…
user2924482
  • 8,380
  • 23
  • 89
  • 173
10
votes
1 answer

CloudKit fetchRecordChangesOperation gives a "AppDefaultZone does not support sync semantics"

I'm using a CKFetchRecordChangesOperation with a CKFetchRecordsChangeToken to grab changes and it is telling me that the "AppDefaultZone does not support sync semantics". Here is the offending code: -…
Jonathan
  • 925
  • 6
  • 19
10
votes
2 answers

How to set up a minimal CKSubscription?

I want to set up a simple CKSubscription that notifies me a recordType was created, how?
János
  • 32,867
  • 38
  • 193
  • 353
10
votes
1 answer

How do I check if user can login to CloudKit?

Can I use the same way I check for iCloud availability or is there some other way of checking for CloudKit availability?
ninjaneer
  • 6,951
  • 8
  • 60
  • 104
9
votes
0 answers

CoreData with CloudKit: After model migration everything is duplicated

I tried to migrate my CoreData-Model (with CloudKit) and it duplicated all of the objects I had stored. How can I correctly migrate when using CoreData with CloudKit? Summary I am using CoreData with CloudKit. A few days ago, I made some changes to…
9
votes
2 answers

Android: How to sync application data stored in Room database between devices of the same user?

I am working on an app that stores user's data locally. I have used the Room database to store the user-created data in an Android device. Now if the user has more then one device then the data should be available on all their (Android) devices…
Bharat
  • 2,987
  • 2
  • 32
  • 48
9
votes
6 answers

CloudKit - "Invalid bundle ID for container"

I've just create a project in Xcode 9 beta 6 and add this code: let privateDB = CKContainer.default().privateCloudDatabase let greatID = CKRecordID(recordName: "GreatPlace") let place = CKRecord(recordType: "Place", recordID:…
Sebastian
  • 6,154
  • 5
  • 33
  • 51
9
votes
1 answer

How to save pdf document to iCloud Drive programmatically using swift?

My app creates a pdf file, and I want to save that pdf document to iCloud Drive programmatically using swift 3. For a sample, here I used a Text file to save in iCloud Drive. This is my code: func copyDocumentsToiCloudDrive() { var error:…
anas.p
  • 2,246
  • 19
  • 26
9
votes
3 answers

CKContainer.discoverAllIdentities always fails

The CKContainer.discoverAllIdentities request always fails in my CloudKit app. It has continually failed over the course of several days. A simplified version of the code that is failing (which results in the same error) is: private func…
Hunter Monk
  • 1,967
  • 1
  • 14
  • 25
9
votes
1 answer

How can each iCloud user save a user specific subscription in CloudKit?

I’m having an issue creating subscriptions in a public CloudKit database. The code works fine when saving the subscription for the first iCloud user but fails trying to save a slightly different subscription against the same record type for a second…
rmaddy
  • 314,917
  • 42
  • 532
  • 579
9
votes
2 answers

How to query CloudKit for recordID IN [CKRecordID]

My predicate wants to exclude some records that are already downloaded and available in a [CKRecordID]. Now I can query 1 CKRecordID[0], but not the [CKRecordID] array. How can I query the array? let excludeIDs: [CKRecordID] This works: let pred1 =…
Rob van den Berg
  • 800
  • 5
  • 21
9
votes
2 answers

CKQueryOperation queryCompletionBlock only runs 3 times

I'm trying to download a batch of records from my iCloud public database using CloudKit and the cursor. The code works fine for the first 3 executions, regardless of how the resultsLimit is set, but the 4th completion block is never executed. If…
Oswaldt
  • 91
  • 3
9
votes
2 answers

CloudKit Push Notifications didReceiveRemoteNotification never called

I am using CloudKit to store user data and want to get push notifications when the records are changed or new records are created. But it does not work... I register for the subscriptions like this: - (void) updateCloudSubscriptions { …
codingFriend1
  • 6,487
  • 6
  • 45
  • 67