ARTRealtimeChannelState
Objective-C
enum ARTRealtimeChannelState : NSUInteger {}
Swift
enum ARTRealtimeChannelState : UInt, @unchecked Sendable
Describes the possible states of an ARTRealtimeChannel object.
-
The channel has been initialized but no attach has yet been attempted.
Declaration
Objective-C
ARTRealtimeChannelInitializedSwift
case initialized = 0 -
An attach has been initiated by sending a request to Ably. This is a transient state, followed either by a transition to
ARTRealtimeChannelAttached,ARTRealtimeChannelSuspended, orARTRealtimeChannelFailed.Declaration
Objective-C
ARTRealtimeChannelAttachingSwift
case attaching = 1 -
The attach has succeeded. In the attached state a client may publish and subscribe to messages, or be present on the channel.
Declaration
Objective-C
ARTRealtimeChannelAttachedSwift
case attached = 2 -
A detach has been initiated on an
ARTRealtimeChannelAttachedchannel by sending a request to Ably. This is a transient state, followed either by a transition toARTRealtimeChannelDetachedorARTRealtimeChannelFailed.Declaration
Objective-C
ARTRealtimeChannelDetachingSwift
case detaching = 3 -
The channel, having previously been
ARTRealtimeChannelAttached, has been detached by the user.Declaration
Objective-C
ARTRealtimeChannelDetachedSwift
case detached = 4 -
The channel, having previously been
ARTRealtimeChannelAttached, has lost continuity, usually due to the client being disconnected from Ably for longer than two minutes. It will automatically attempt to reattach as soon as connectivity is restored.Declaration
Objective-C
ARTRealtimeChannelSuspendedSwift
case suspended = 5 -
An indefinite failure condition. This state is entered if a channel error has been received from the Ably service, such as an attempt to attach without the necessary access rights.
Declaration
Objective-C
ARTRealtimeChannelFailedSwift
case failed = 6