CloudKit over cellular

I had problem usinng CloudKit (CKQueryOperation, CKOperation) over cellular network. So far I have found out these work arounds.


• To use CloudKit over celluar, you need to change -CKOperation.qualityOfService to .UserInitiated or .UserInteractive

operation.qualityOfService = .UserInitiated

If this option is set to .Background (default), a query operation does not respond in iOS9. (you won't get time-out error too.)


• iCloud sync over celluar network must be ON.

Settings app -> iCloud -> iCloud Drive -> Use Celluar Data -> ON

"operation.allowsCellularAccess = true" is not enough.


If this option is off, you will get this "offline" error:

Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." UserInfo={NSErrorFailingURLStringKey=https://static.gc.apple.com/sap/setup.crt, NSErrorFailingURLKey=https://static.gc.apple.com/sap/setup.crt, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=50, NSLocalizedDescription=The Internet connection appears to be offline.}, NSErrorFailingURLKey: https://static.gc.apple.com/sap/setup.crt, NSDebugDescription: NSURLErrorDomain: -1009, NSLocalizedDescription: The Internet connection appears to be offline., _kCFStreamErrorDomainKey: 1, NSErrorFailingURLStringKey: https://static.gc.apple.com/sap/setup.crt, _kCFStreamErrorCodeKey: 50])





references:

http://stackoverflow.com/questions/32493698/ios-9-cloudkit-query-does-not-return-anything-while-connected-to-cellular-netwo

twitter.com/bobard/status/644986352203751424

Im having the same issue. Unfortunately I didn't see this post but created another thread a day after yours. See this https://forums.developer.apple.com/thread/22233 I'm also having the same issue. Both development and production environment. Having changed queue and operation priorities to high/user doesn't do anything. I had some strange behavior when I would unit test my code on wifi then immediately switch to cellular. Have you filed a bug yet?

Thanks for the info, setting the qualityOfService fixed it in my case. This seems to be another blunder on their part, quite a lot of them in iOS 9 😟

iCloud sync over celluar network must be ON. - is what resolved this for me.
Settings app -> iCloud -> iCloud Drive -> Use Celluar Data -> ON

The switch for this is quite hard to find though. On ios 14.1 go to the bottom of the mobile data page.
CloudKit over cellular
 
 
Q