CloudKit network failure during app review

We just got rejected by app review because our app failed to download content from the public CloudKit database. Everything works fine in TestFlight which also uses the production environment. The screenshot they sent me shows the following error:


CKError "Network Failure" (4/1013) "Fetching asset failed"


Does anyone have experience with this? Any help would be greatly appreciated!

Replies

Did you figure this out? My app is getting rejected constantly (3 times now) all because Cloudkit doesn't seem to log in for them. It works great for me, even on test flight in production... I don't think I'll ever make an app using cloudkit again.

My understanding was that if you added "com.apple.developer.icloud-container-environment" to your .entitlements file you had to set it to "Production" before submitting it. Are you saying there might be other things necessary to switch from Development to Production before submitting the app?

I thought that you do not need to switch it to production via the PList and it will switch it automatically for you based on running the app outside of Xcode.

How did you fix this tober79? I have this same issue.

There are issues with CloudKit and CKDatabaseOperations while on Cellular. I have reported the bug. Have you done any testing with your app Development AND Production while on cellular? I'm assuming you're trying to perform CKQueryOperations? Mine never callback on cellular. They don't even timeout with error.

I had that behaviour (no callback called, no error). I fixed it by setting the qualityOfService parameter of the CKQueryOperation to UserInitiated.

The default qualityOfService changed from iOS8 to iOS9.

Do you have any solution for this? I have exactly the same problem, my app was rejected a couple of times already.

YOU SIR are my HERO!

I had the same bug. CKDatabaseOperations wouldn't work on Cellular and i would get not single error or callback, even if I would set

operationallowsCellularAccess = false

which is pretty weird. But setting

operation.qualityOfService = .UserInitiated

works.

Perfect!

Got rejected 3 times too and can finally resubmit the app.

THANK YOU VERY MUCH 😉

Okay so after fixing the cellular "bug", my app always gets rejected for

CKError "Network Failure" errorCode: 4

I tried to reproduce this error in any way but without success.


Has anyone found a fix for this?

Is this (in the Cloudkit.entitlements):

com.apple.developer.icloud-container-environment = Production

working?

I'm now running into a variant of this - CloudKit is reporting CKErrors with 'network timeout' as the failure reason when in App Review. They say on both Wi-Fi and cellular.


The TestFlight version of the same build works fine. I'm pretty darn confused / frustrated at this point.

Ok. I was just rejected for same reason.


My entitlements are set for production. I am checking for cellular and wifi connectivity before attemting upload as well as checking for signed in to icloud. It works great in testflight which is in production environment. Additionally, my testflight users have not had any problems with this and I can't recreate it. I wiped my own devices down, created a new dummy email and itunes account and logged in that way and it worked light a charm in test flight first try. I'm stuck.


Any advice would be appreciated,

Villager