Reports whether the current user’s iCloud account can be accessed.
- iOS 8.0+
- macOS 10.10+
- UIKit for Mac 13.0+Beta
- tvOS 9.0+
- watchOS 3.0+
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
nilif 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
completion parameter. Call this method before accessing the private database to determine whether that database is available. While your app is running, use the
CKAccount notification to detect account changes and call this method again to retrieve the status for the new account.