Instance Method

renewCredentials(for:completion:)

Renews account credentials when the credentials are no longer valid.

Declaration

func renewCredentials(for account: ACAccount!, completion completionHandler: ACAccountStoreCredentialRenewalHandler!)

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 will prompt 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 will obtain a new one.

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

See Also

Renewing Account Credentials

typealias ACAccountStoreCredentialRenewalHandler

Specifies a handler to call when credentials are renewed.

enum ACAccountCredentialRenewResult

Status codes of credential renewal requests.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software