Contents

state

The current state of the session.

Declaration

var state: CredentialSession.State { get async }

Mentioned in

Discussion

Sessions start in the CredentialSession.State.management state. Calls to the wired or card emulation APIs change the state to CredentialSession.State.wired(credential:) or CredentialSession.State.cardEmulation(credential:). Leaving wired or card emulation mode returns the state to CredentialSession.State.management.

Explicitly invalidating the session, encountering an error, or the app entering the background changes the state to CredentialSession.State.invalid. An invalid session can’t return to one of the other states.

See Also

Accessing the session state