ARTBaseMessage
Objective-C
@interface ARTBaseMessage : NSObject <NSCopying>
Swift
class ARTBaseMessage : NSObject, NSCopying
A base interface for an ARTMessage and an ARTPresenceMessage objects.
-
A Unique ID assigned by Ably to this message.
Declaration
Objective-C
@property (nonatomic, nullable) NSString *id;Swift
var id: String? { get set } -
Timestamp of when the message was received by Ably, as a
NSDateobject.Declaration
Objective-C
@property (nonatomic, nullable) NSDate *timestamp;Swift
var timestamp: Date? { get set } -
The client ID of the publisher of this message.
Declaration
Objective-C
@property (nonatomic, nullable) NSString *clientId;Swift
var clientId: String? { get set } -
The connection ID of the publisher of this message.
Declaration
Objective-C
@property (nonatomic) NSString *_Nonnull connectionId;Swift
var connectionId: String { get set } -
This is typically empty, as all messages received from Ably are automatically decoded client-side using this value. However, if the message encoding cannot be processed, this attribute contains the remaining transformations not applied to the
datapayload.Declaration
Objective-C
@property (nonatomic, nullable) NSString *encoding;Swift
var encoding: String? { get set } -
The message payload, if provided.
-
A JSON object of arbitrary key-value pairs that may contain metadata, and/or ancillary payloads.
Declaration
Objective-C
@property (nonatomic, nullable) id<ARTJsonCompatible> extras;Swift
var extras: (any ARTJsonCompatible)? { get set } -
Undocumented
Declaration
Objective-C
@property (nonatomic, readonly) BOOL isIdEmptySwift
var isIdEmpty: Bool { get } -
Undocumented
Declaration
Objective-C
- (id __nonnull)decodeWithEncoder:(ARTDataEncoder*)encoder error:(NSError *__nullable*__nullable)error;Swift
func decode(with encoder: ARTDataEncoder, error: NSErrorPointer) -> Any -
Undocumented
Declaration
Objective-C
- (id __nonnull)encodeWithEncoder:(ARTDataEncoder*)encoder error:(NSError *__nullable*__nullable)error;Swift
func encode(with encoder: ARTDataEncoder, error: NSErrorPointer) -> Any