ARTBaseMessage

Objective-C

@interface ARTBaseMessage : NSObject <NSCopying>

Swift

class ARTBaseMessage : NSObject, NSCopying

A base interface for an ARTMessage and an ARTPresenceMessage objects.

  • id

    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 NSDate object.

    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 data payload.

    Declaration

    Objective-C

    @property (nonatomic, nullable) NSString *encoding;

    Swift

    var encoding: String? { get set }
  • The message payload, if provided.

    Declaration

    Objective-C

    @property (nonatomic, nullable) id data;

    Swift

    var data: Any? { get set }
  • 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: ARTJsonCompatible? { get set }