Search code examples
cloudkiticloud-drive

Running CloudKit app with iCloud drive disabled


I have two application accessing iCloud. This first one is a document-base app using iCloud folder through UIDocument/NSDocument class without CloudKit. On the contrary, the second application uses CloudKit to access data via cloudkit database but not iCloud folder.

When I disable iCloud drive the first application disappears from the list, however the second application stays, suggesting that access to iCloud is still available.

However, when iCloud drive is disabled, CKContainer.accountStatus returns 'noAccount', even though I am signed in. When I ignore that and run a query, it returns no records.

iCloud drive takes a considerable amount of device storage, so some users may choose to disable it. For that reason I prefer to access iCloud avoiding iCloud drive. Is there a way?

BTW, iCloud documentation strongly differentiates between CloudKit and iCloud Drive which may be interpreted as another evidence that presence of iCloud drive is not essential for iCloud database access.


Solution

  • Your findings are correct. iCloud Drive access is required in order for an app to use CloudKit. There isn't a way around it (that I know of).

    I've spoken with an Apple engineer about this in the past and they confirmed that iCloud Drive is necessary.