Help users access and manage their external accounts from within your app, without requiring them to enter login credentials.


The Accounts framework provides access to user accounts stored in the Accounts database. An account stores the login credentials of a particular service, such as Twitter, that can be used as authentication for the service. By implementing the Accounts framework into your app, you do not need to be responsible for storing account logins yourself. Instead, the user can grant access for your app to use their account login credentials, bypassing the need to type their username and password. If no account for a particular service exists in the user’s Accounts database, you can let them create and save an account from within your app.



class ACAccount

An ACAccount object encapsulates information about a user account stored in the Accounts database. You can create and retrieve accounts using an ACAccountStore object. The ACAccountStore object provides an interface to the persistent Accounts database. For each user, all account objects belong to a single ACAccountStore object.

class ACAccountCredential

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

class ACAccountStore

The ACAccountStore class provides an interface for accessing, manipulating, 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 ACAccountStore object.

class ACAccountType

An ACAccountType object encapsulates information about all accounts of a particular type. You do not create account type objects directly. To obtain an account type, use the accountType(withAccountTypeIdentifier:) method or the accountType property of an account object. Account Type Identifiers describes the identifiers for currently supported account types. You can also use the accounts(with:) method to obtain all accounts of a particular type.