Contents

renewCredentials(for:completion:)

Renews account credentials when the credentials are no longer valid.

Declaration

func renewCredentials(for account: ACAccount!, completion completionHandler: (@Sendable (ACAccountCredentialRenewResult, (any Error)?) -> Void)!)
func renewCredentials(for account: ACAccount!) async throws -> ACAccountCredentialRenewResult

Parameters

  • account:

    The account to renew credentials.

  • completionHandler:

    The handler to call when the renewal has completed.

Discussion

For Twitter and Sina Weibo accounts, this method prompts the user to go to Settings to re-enter their password.

For Facebook accounts, if the access token has become invalid due to a regular expiration, this method obtains a new one.

If the user has deauthorized your app, this renewal request returns ACAccountCredentialRenewResultRejected.

See Also

Renewing Account Credentials