iosnetwork-programmingcloudkitios14lte

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


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?


Solution

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