Starting with iOS 14 or 14.0.1 WiFi works but LTE does NOT

222 views Asked by At

I have an App I am working on that uses CloudKit and has been working fine. After upgrading iPhones to iOS 14.x it continues to work with WiFi, but with LTE it just no longer finishes the CKFetchDatabaseChangesOperation. I can turn the WiFi back on and it all works perfectly, switch to LTE and hangs on the CKFetchDatabaseChangesOperation. I can even startup with LTE, it hangs, switch to WiFi while still running the App, it kicks in an finished the operation as normal.

Can anyone help me to figure out if it is something in my code or an iOS bug?

I have checked with both copies complied pre xCode 12 iOS 14.x and post both behave the same weird way?

2

There are 2 answers

4
Clifton Labrum On BEST ANSWER

I would check a couple things.

== 1 ==

First, make sure cellular data is turned on for your app:

Settings > Cellular > [Your App]

== 2 ==

The second thing to check is setting your operation to have higher priority. It may actually be working but is just really slow.

let operation = CKFetchDatabaseChangesOperation()
  
//Set these...
operation.qualityOfService = .userInitiated
operation.queuePriority = .veryHigh

...

It's possible iCloud is delaying the transmission of data to not use too much cellular data.

0
Shockki On

• 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. (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.