The CKContainer class has a method called accountStatusWithCompletionHandler: designed for this purpose. Call it and check out CKAccountStatusAvailable . You still need to listen to NSUbiquityIdentityDidChangeNotification if the status changes.
Tom harrington
source share