10

Can I use the same way I check for iCloud availability or is there some other way of checking for CloudKit availability?

ninjaneer
  • 6,951
  • 8
  • 60
  • 104

1 Answers1

12

The CKContainer class has a method called accountStatusWithCompletionHandler: that's designed for this purpose. Call it and check for CKAccountStatusAvailable. You'll still need to listen for NSUbiquityIdentityDidChangeNotification in case the status changes.

Tom Harrington
  • 69,312
  • 10
  • 146
  • 170