ACAccount Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/Accounts.framework
Availability
Available in iOS 5.0 and later.
Declared in
ACAccount.h

Overview

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.

Tasks

Initializing Accounts

Accessing Properties

Properties

accountDescription

A human-readable description of the account.

@property(nonatomic, copy) NSString *accountDescription
Discussion

This property is available if the user grants the application access to this account; otherwise it is nil.

Availability
  • Available in iOS 5.0 and later.
Declared In
ACAccount.h

accountType

The type of service account.

@property(nonatomic, retain) ACAccountType *accountType
Discussion

This property is required. You specify the account type using the initWithAccountType: method. You can use the accountsWithAccountType: method to retrieve all accounts of a particular type.

Availability
  • Available in iOS 5.0 and later.
Declared In
ACAccount.h

credential

The credential used to authenticate the user of this account.

@property(nonatomic, retain) ACAccountCredential *credential
Discussion

This property is required and must be set before the account is saved. For privacy reasons, this property is inaccessible after the account is saved.

Availability
  • Available in iOS 5.0 and later.
Declared In
ACAccount.h

identifier

A unique identifier for this account. (read-only)

@property(nonatomic, readonly) NSString *identifier
Discussion

Use the accountWithIdentifier: method to get an account with the specified identifier.

Availability
  • Available in iOS 5.0 and later.
Declared In
ACAccount.h

username

The username for this account.

@property(nonatomic, copy) NSString *username
Discussion

This property must be set before the account is saved. After the account is saved, this property is available if the user grants the application access to this account; otherwise it is nil.

Availability
  • Available in iOS 5.0 and later.
Declared In
ACAccount.h

Instance Methods

initWithAccountType:

Initializes a new account of the specified type.

- (id)initWithAccountType:(ACAccountType *)type
Parameters
type

The type of this account.

Return Value

The newly initialized account.

Availability
  • Available in iOS 5.0 and later.
Declared In
ACAccount.h