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
ARTRealtimeChannelInitialized
Swift
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
ARTRealtimeChannelAttaching
Swift
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
ARTRealtimeChannelAttached
Swift
case attached = 2
-
A detach has been initiated on an
ARTRealtimeChannelAttached
channel by sending a request to Ably. This is a transient state, followed either by a transition toARTRealtimeChannelDetached
orARTRealtimeChannelFailed
.Declaration
Objective-C
ARTRealtimeChannelDetaching
Swift
case detaching = 3
-
The channel, having previously been
ARTRealtimeChannelAttached
, has been detached by the user.Declaration
Objective-C
ARTRealtimeChannelDetached
Swift
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
ARTRealtimeChannelSuspended
Swift
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
ARTRealtimeChannelFailed
Swift
case failed = 6