ARTChannel
Objective-C
@interface ARTChannel : NSObject
Swift
class ARTChannel : NSObject, @unchecked Sendable
The base class for ARTRestChannel
and ARTRealtimeChannel
.
Ably platform service organizes the message traffic within applications into named channels. Channels are the medium through which messages are distributed; clients attach to channels to subscribe to messages, and every message published to a unique channel is broadcast by Ably to all subscribers.
See
SeeARTChannelProtocol
for details.
-
Undocumented
Declaration
Objective-C
@property (readonly) NSString *name
Swift
var name: String { get }
-
Undocumented
Declaration
Objective-C
- (void)publish:(nullable NSString *)name data:(nullable id)data;
Swift
func publish(_ name: String?, data: Any?)
-
Undocumented
Declaration
Objective-C
- (void)publish:(nullable NSString *)name data:(nullable id)data callback:(nullable ARTCallback)callback;
Swift
func publish(_ name: String?, data: Any?, callback: ARTCallback? = nil)
-
Undocumented
Declaration
Objective-C
- (void)publish:(nullable NSString *)name data:(nullable id)data clientId:(NSString *)clientId;
Swift
func publish(_ name: String?, data: Any?, clientId: String)
-
Undocumented
Declaration
Objective-C
- (void)publish:(nullable NSString *)name data:(nullable id)data clientId:(NSString *)clientId callback:(nullable ARTCallback)callback;
Swift
func publish(_ name: String?, data: Any?, clientId: String, callback: ARTCallback? = nil)
-
Undocumented
Declaration
Objective-C
- (void)publish:(nullable NSString *)name data:(nullable id)data extras:(nullable id<ARTJsonCompatible>)extras;
Swift
func publish(_ name: String?, data: Any?, extras: (any ARTJsonCompatible)?)
-
Undocumented
Declaration
Objective-C
- (void)publish:(nullable NSString *)name data:(nullable id)data extras:(nullable id<ARTJsonCompatible>)extras callback:(nullable ARTCallback)callback;
Swift
func publish(_ name: String?, data: Any?, extras: (any ARTJsonCompatible)?, callback: ARTCallback? = nil)
-
Undocumented
Declaration
Objective-C
- (void)publish:(nullable NSString *)name data:(nullable id)data clientId:(NSString *)clientId extras:(nullable id<ARTJsonCompatible>)extras;
Swift
func publish(_ name: String?, data: Any?, clientId: String, extras: (any ARTJsonCompatible)?)
-
Undocumented
Declaration
Objective-C
- (void)publish:(nullable NSString *)name data:(nullable id)data clientId:(NSString *)clientId extras:(nullable id<ARTJsonCompatible>)extras callback:(nullable ARTCallback)callback;
Swift
func publish(_ name: String?, data: Any?, clientId: String, extras: (any ARTJsonCompatible)?, callback: ARTCallback? = nil)
-
Undocumented
Declaration
Objective-C
- (void)publish:(NSArray<ARTMessage *> *)messages;
Swift
func publish(_ messages: [ARTMessage])
-
Undocumented
Declaration
Objective-C
- (void)publish:(NSArray<ARTMessage *> *)messages callback:(nullable ARTCallback)callback;
Swift
func publish(_ messages: [ARTMessage], callback: ARTCallback? = nil)
-
Undocumented
Declaration
Objective-C
- (void)historyWithWrapperSDKAgents:(nullable NSStringDictionary *)wrapperSDKAgents completion:(ARTPaginatedMessagesCallback)callback;
Swift
func history(withWrapperSDKAgents wrapperSDKAgents: [String : String]?) async -> (ARTPaginatedResult<ARTMessage>?, ARTErrorInfo?)
-
Undocumented
Declaration
Objective-C
- (instancetype)initWithName:(NSString *)name andOptions:(ARTChannelOptions *)options rest:(ARTRestInternal *)rest logger:(ARTInternalLog *)logger;
Swift
init(name: String, andOptions options: ARTChannelOptions, rest: ARTRestInternal, logger: InternalLog)
-
Undocumented
Declaration
Objective-C
@property (readonly, nullable) ARTChannelOptions *options
Swift
var options: ARTChannelOptions? { get }
-
Undocumented
Declaration
Objective-C
@property (nonatomic, readonly) ARTDataEncoder *dataEncoder
Swift
var dataEncoder: ARTDataEncoder { get }
-
Exposed so that
ARTPluginAPI
can allow plugins to log via this channel.Declaration
Objective-C
@property (nonatomic, readonly) ARTInternalLog *_Nonnull logger;
Swift
var logger: InternalLog { get }
-
Undocumented
Declaration
Objective-C
- (void)internalPostMessages:(id)data callback:(nullable ARTCallback)callback;
Swift
func internalPostMessages(_ data: Any, callback: ARTCallback? = nil)
-
Undocumented
Declaration
Objective-C
- (BOOL)exceedMaxSize:(NSArray<ARTBaseMessage *> *)messages;
Swift
func exceedMaxSize(_ messages: [ARTBaseMessage]) -> Bool
-
Undocumented
Declaration
Objective-C
- (nullable ARTChannelOptions *)options_nosync;
Swift
func options_nosync() -> ARTChannelOptions?
-
Undocumented
Declaration
Objective-C
- (void)setOptions_nosync:(ARTChannelOptions *_Nullable)options;
Swift
func setOptions_nosync(_ options: ARTChannelOptions?)