ARTChannels
Objective-C
@interface ARTChannels<ChannelType> : NSObject
Swift
class ARTChannels<ChannelType> : NSObject, @unchecked Sendable where ChannelType : AnyObject
Creates and destroys ARTRestChannel and ARTRealtimeChannel objects.
-
Checks if a channel has been previously retrieved using the
-[ARTChannels get:]method.Declaration
Objective-C
- (BOOL)exists:(NSString *)name;Swift
func exists(_ name: String!) -> BoolParameters
nameThe channel name.
Return Value
trueif the channel exists, otherwisefalse. -
Creates a new
ARTRestChannelorARTRealtimeChannelobject, or returns the existing channel object.Declaration
Objective-C
- (ChannelType)get:(NSString *)name;Swift
func get(_ name: String!) -> ChannelType!Parameters
nameThe channel name.
Return Value
A
ARTRestChannelorARTRealtimeChannelobject. -
Creates a new
ARTRestChannelorARTRealtimeChannelobject, with the specifiedARTChannelOptions, or returns the existing channel object.Declaration
Objective-C
- (ChannelType)get:(NSString *)name options:(ARTChannelOptions *)options;Swift
func get(_ name: String!, options: ARTChannelOptions!) -> ChannelType!Parameters
nameThe channel name.
optionsAn
ARTChannelOptionsobject.Return Value
A
ARTRestChannelorARTRealtimeChannelobject. -
Releases an
ARTRestChannelor anARTRealtimeChannelobject by deleting it. It also removes any listeners associated with the channel. To release anARTRealtimeChannelchannel, theARTRealtimeChannelProtocol.statemust beARTRealtimeChannelState.ARTRealtimeChannelInitialized,ARTRealtimeChannelState.ARTRealtimeChannelDetached, orARTRealtimeChannelState.ARTRealtimeChannelFailed.Declaration
Objective-C
- (void)release:(NSString *)name;Swift
func release(_ name: String!)Parameters
nameThe channel name.