SFUserAccountPersister Protocol Reference

Conforms to NSObject
Declared in SFUserAccountManager+Internal.h

– saveAccountForUser:error: required method

Called when the Account manager requires to save the state of an account.

- (BOOL)saveAccountForUser:(nonnull SFUserAccount *)userAccount error:(NSError *_Nonnull *_Nonnull)error

Parameters

userAccount

The instance of SFUserAccount making the call.

error

On output, the error if the return value is NO

Return Value

YES if the account was saved properly, NO in case of error

Declared In

SFUserAccountManager+Internal.h

– fetchAllAccounts: required method

Fetches all the accounts.

- (nonnull NSDictionary<SFUserAccountIdentity*,SFUserAccount*> *)fetchAllAccounts:(NSError *_Nonnull *_Nonnull)error

Parameters

error

On output, the error if the return value is NO

Return Value

NSDictionary with SFUserAccountIdentity as keys and SFUserAccount as values

Declared In

SFUserAccountManager+Internal.h

– deleteAccountForUser:error: required method

Allows you to remove the given user account.

- (BOOL)deleteAccountForUser:(nonnull SFUserAccount *)user error:(NSError *_Nonnull *_Nonnull)error

Parameters

user

The user account to remove.

error

Output error parameter, populated if there was an error deleting the account (likely from the filesystem operations).

Return Value

YES if the deletion was successful, NO otherwise. Note: If no persisted account matching the user parameter is found, no action will be taken, and deletion will be reported as successful.

Declared In

SFUserAccountManager+Internal.h