ARTOutboundAnnotation

Objective-C

@interface ARTOutboundAnnotation : NSObject <NSCopying>

Swift

class ARTOutboundAnnotation : NSObject, NSCopying, @unchecked Sendable

Represents an outbound annotation to be published or deleted.

This type is based on ARTAnnotation but omits the properties that are populated by the Realtime service.

  • id

    An ID assigned (by the publisher or Ably) to this annotation, which is used as the idempotency key.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *id;

    Swift

    var id: String? { get }
  • The type of annotation it is, typically some identifier together with an aggregation method; for example: “emoji:distinct.v1”. Handled opaquely by the SDK and validated serverside.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *_Nonnull type;

    Swift

    var type: String { get }
  • The client ID of the publisher of this annotation.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *clientId;

    Swift

    var clientId: String? { get }
  • The name of this annotation. This is the field that most annotation aggregations will operate on. For example, using “distinct.v1” aggregation (specified in the type), the message summary will show a list of clients who have published an annotation with each distinct annotation.name.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *name;

    Swift

    var name: String? { get }
  • An optional count, only relevant to certain aggregation methods, see aggregation methods documentation for more info.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSNumber *count;

    Swift

    var count: NSNumber? { get }
  • The annotation payload, if provided.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) id data;

    Swift

    var data: Any? { get }
  • A JSON object of arbitrary key-value pairs that may contain metadata, and/or ancillary payloads.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) id<ARTJsonCompatible> extras;

    Swift

    var extras: (any ARTJsonCompatible)? { get }
  • Undocumented

    Declaration

    Objective-C

    - (instancetype)initWithId:(nullable NSString *)annotationId
                          type:(NSString *)type
                      clientId:(nullable NSString *)clientId
                          name:(nullable NSString *)name
                         count:(nullable NSNumber *)count
                          data:(nullable id)data
                        extras:(nullable id<ARTJsonCompatible>)extras;

    Swift

    init(id annotationId: String?, type: String, clientId: String?, name: String?, count: NSNumber?, data: Any?, extras: (any ARTJsonCompatible)?)