Instance Method


Reports whether the current user’s iCloud account can be accessed.


func accountStatus(completionHandler: @escaping (CKAccountStatus, Error?) -> Void)



A block that has no return value and takes the following parameters:


The status of the current user’s iCloud account.


An error object, or nil if the status is determined successfully. Use the information in the error object to determine whether the problem has a workaround.


This method determines the status of the current user’s iCloud account asynchronously, reporting the results to the block in the completionHandler parameter. Call this method before accessing the private database to determine whether that database is available. While your app is running, use the CKAccountChanged notification to detect account changes and call this method again to retrieve the status for the new account.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software