The object you use to request, manage, and store the user’s account information.


class ACAccountStore : NSObject


The ACAccountStore class provides an interface for accessing, managing, and storing accounts. To create and retrieve accounts from the Accounts database, you must create an ACAccountStore object. Each ACAccount object belongs to a single account store object.


Requesting Access

Getting Accounts

var accounts: NSArray!

The accounts managed by this account store.

func account(withIdentifier: String!) -> ACAccount!

Returns the account with the specified identifier.

func accounts(with: ACAccountType!) -> [Any]!

Returns all accounts of the specified type.

Getting Account Types

func accountType(withAccountTypeIdentifier: String!) -> ACAccountType!

Returns an account type that matches the specified identifier.

Saving Accounts

typealias ACAccountStoreSaveCompletionHandler

Specifies a handler to call when an Accounts database operation is complete.

Renewing Account Credentials

func renewCredentials(for: ACAccount!, completion: ACAccountStoreCredentialRenewalHandler!)

Renews account credentials when the credentials are no longer valid.

typealias ACAccountStoreCredentialRenewalHandler

Specifies a handler to call when credentials are renewed.

enum ACAccountCredentialRenewResult

Status codes of credential renewal requests.

Removing Accounts

typealias ACAccountStoreRemoveCompletionHandler

Specifies a handler to call when an account is removed from the store.

Responding to Changes

static let ACAccountStoreDidChange: NSNotification.Name

Posted when the accounts managed by this account store changed in the database.


Inherits From

Conforms To

See Also

Account Management

class ACAccount

The information associated with one of the user’s accounts.

class ACAccountCredential

An ACAccountCredential object encapsulates the information needed to authenticate a user.