Search code examples
ioscloudkit

CKContainer accountStatusWithCompletionHandler returns wrong value


accountStatusWithCompletionHandler method returns .NoAccount value. Any idea why returned value is not .Available? I am logged in to iCloud, and connecting to internet.

Doc says .NoAccount means:

The user’s iCloud account is not available because no account information has been provided for this device.

I do not receive any error. The reason may be that app is not using private database? Doc says:

Call this method before accessing the private database to determine whether that database is available.


Solution

  • Figured out, iCloud Drive was turned off for the app.