Documentation Archive Developer
Search

Accounts Changes for Swift

Accounts

Modified ACAccount
Declaration
From
class ACAccount : NSObject {
    init!(accountType type: ACAccountType!)
    var identifier: String? { get }
    var accountType: ACAccountType!
    var accountDescription: String!
    var username: String!
    var userFullName: String! { get }
    var credential: ACAccountCredential!
}
To
class ACAccount : NSObject {
    init!(accountType type: ACAccountType!)
    var identifier: String! { get }
    var accountType: ACAccountType!
    var accountDescription: String!
    var username: String!
    var userFullName: String! { get }
    var credential: ACAccountCredential!
}

Declaration
From
var identifier: String? { get }
To
var identifier: String! { get }

Declaration
From
class ACAccountStore : NSObject {
    var accounts: [AnyObject]? { get }
    func accountWithIdentifier(_ identifier: String!) -> ACAccount!
    func accountTypeWithAccountTypeIdentifier(_ typeIdentifier: String!) -> ACAccountType!
    func accountsWithAccountType(_ accountType: ACAccountType!) -> [AnyObject]!
    func saveAccount(_ account: ACAccount!, withCompletionHandler completionHandler: ACAccountStoreSaveCompletionHandler!)
    func requestAccessToAccountsWithType(_ accountType: ACAccountType!, withCompletionHandler handler: ACAccountStoreRequestAccessCompletionHandler!)
    func requestAccessToAccountsWithType(_ accountType: ACAccountType!, options options: [NSObject : AnyObject]!, completion completion: ACAccountStoreRequestAccessCompletionHandler!)
    func renewCredentialsForAccount(_ account: ACAccount!, completion completionHandler: ACAccountStoreCredentialRenewalHandler!)
    func removeAccount(_ account: ACAccount!, withCompletionHandler completionHandler: ACAccountStoreRemoveCompletionHandler!)
}
To
class ACAccountStore : NSObject {
    var accounts: [AnyObject]! { get }
    func accountWithIdentifier(_ identifier: String!) -> ACAccount!
    func accountTypeWithAccountTypeIdentifier(_ typeIdentifier: String!) -> ACAccountType!
    func accountsWithAccountType(_ accountType: ACAccountType!) -> [AnyObject]!
    func saveAccount(_ account: ACAccount!, withCompletionHandler completionHandler: ACAccountStoreSaveCompletionHandler!)
    func requestAccessToAccountsWithType(_ accountType: ACAccountType!, withCompletionHandler handler: ACAccountStoreRequestAccessCompletionHandler!)
    func requestAccessToAccountsWithType(_ accountType: ACAccountType!, options options: [NSObject : AnyObject]!, completion completion: ACAccountStoreRequestAccessCompletionHandler!)
    func renewCredentialsForAccount(_ account: ACAccount!, completion completionHandler: ACAccountStoreCredentialRenewalHandler!)
    func removeAccount(_ account: ACAccount!, withCompletionHandler completionHandler: ACAccountStoreRemoveCompletionHandler!)
}

Declaration
From
var accounts: [AnyObject]? { get }
To
var accounts: [AnyObject]! { get }