Questions tagged [ckoperation]

9 questions
35
votes
3 answers

How to sync records between Core Data and CloudKit efficiently

I'm currently learning how to use CloudKit Framework and lack of documentation or examples showing how to sync Core Data and CloudKit. I have watched all WWDC videos (2014, 2015, 2016) Dedicated to CloudKit, but none of them telling us how to…
Adelmaer
  • 2,209
  • 3
  • 22
  • 45
5
votes
1 answer

Optimizing CKFetchRecordZoneChangesOperation to fetch desiredKeys

In my CloudKit app, I create one zone in the private database where all the CKRecords are stored. The CKRecords can be of 10 different record types, and some of them can have CKAssets attached to them. I use CKFetchRecordZoneChangesOperation to find…
Z S
  • 7,039
  • 12
  • 53
  • 105
2
votes
0 answers

Why CloudKit CKOperations offen timeout?

I'm now using CKQueryOperation and CKModifyRecordsOperation to deal with my records in cloudKit.I find that whether I use cellular or wifi, sometimes it goes well, but sometimes the operations offen appears time out,CKError.Code = 4.Here are my…
desmond_yy
  • 83
  • 6
2
votes
0 answers

CloudKit CKOperation Queue

I have to CKOperations and want to start the 2nd one after the 1st operation finishes. How can I "tell" the 2nd operation to wait until the 2nd one is finished? This is my first operation (create custom zone): let operation =…
Luca
  • 221
  • 2
  • 11
1
vote
1 answer

CloudKit CKdatabaseOperation does not throw error in simulator depending on .qualityOfService setting

I am basically messing around with CloudKit. I have 2 questions that I would like some help/education with. (1) When I try to run the following code in the simulator with WiFi Turned off (To simulate network unavailability), I expect it to throw…
AdiTheExplorer
  • 259
  • 4
  • 13
1
vote
0 answers

CloudKit Discover User with Email

I am using the CKOperation below to find a user record by their email. Every time I run the code it always returns the user's found as nil. I know that the email address is correct. Do you know where I could be going wrong or if there is an error…
Tom Coomer
  • 6,227
  • 12
  • 45
  • 82
0
votes
1 answer

How to queue CKOperations for different CKDatabase

I create 2 operations, let's say CKModifySubscriptionsOperation. One is for private, another for shared database. I could queue them by adding to the OperationQueue, each next would start after previous completion block. let operationQueue =…
bodich
  • 1,708
  • 12
  • 31
0
votes
0 answers

return no longLived CKOperation

I created a CKOperation whose longLived was set "true". Turn on flight mode for my iPhone(iOS 9.3.5) kill app relaunch, and found no longLived operations [[CKContainer defaultContainer]…
anna
  • 662
  • 5
  • 28
0
votes
1 answer

CloudKit: CKOperations don't run when app is suspended

I am listening to remote notifications from CKSubscriptions from a CloudKit public database. I want to handle the case where I receive the notifications while the app is suspended ... I simulate this on my device by running the app using Xcode with…
Z S
  • 7,039
  • 12
  • 53
  • 105