Contents

saveAccount(_:withCompletionHandler:)

Saves an account to the Accounts database.

Declaration

func saveAccount(_ account: ACAccount!, withCompletionHandler completionHandler: (@Sendable (Bool, (any Error)?) -> Void)!)
func saveAccount(_ account: ACAccount!) async throws -> Bool

Parameters

  • account:

    The account to save.

  • completionHandler:

    The handler to call when the operation completes. The handler is called on an arbitrary queue.

Discussion

If the account type supports authentication and the account isn’t authenticated, the account server uses the account’s credentials to authenticate it. If the authentication is successful, the account is saved; otherwise it’s not saved.

See Also

Saving Accounts