state
The current state of the session.
Declaration
@Published<GroupSession<ActivityType>.State> final var state: GroupSession<ActivityType>.State { get }Discussion
Use this property to get the current state value, or configure a subscriber to detect changes to the value. To change the state of a session, call the join() and leave() methods.
If a failure occurs or the session ends, the session object transitions to the GroupSession.State.invalidated(reason:)state. If the session ends because of an error, it provides information about that error.