Classes

The following classes are available globally.

  • Undocumented

    See more

    Declaration

    Objective-C

    @interface ARTAnnotation : NSObject<NSCopying>
    
    /// A Unique ID assigned by Ably to this message.
    @property (nullable, readonly, nonatomic) NSString *id;
    
    /// The action, whether this is an annotation being added or removed, one of the `ARTAnnotationAction` enum values.
    @property (readonly, nonatomic) ARTAnnotationAction action;
    
    /// The client ID of the publisher of this message.
    @property (nonatomic, readonly, nullable) NSString *clientId;
    
    /// 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.
    @property (nullable, readonly, nonatomic) NSString *name;
    
    /// An optional count, only relevant to certain aggregation methods, see aggregation methods documentation for more info.
    @property (nullable, readonly, nonatomic) NSNumber *count;
    
    /// The message payload, if provided.
    @property (nonatomic, readonly, nullable) id data;
    
    /// 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.
    @property (nonatomic, readonly, nullable) NSString *encoding;
    
    /// Timestamp of when the message was received by Ably, as a `NSDate` object.
    @property (nullable, nonatomic, readonly) NSDate *timestamp;
    
    /// This annotation's unique serial (lexicographically totally ordered).
    @property (readonly, nonatomic) NSString *serial;
    
    /// The serial of the message (of type `MESSAGE_CREATE`) that this annotation is annotating.
    @property (readonly, nonatomic) NSString *messageSerial;
    
    /// 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.
    @property (readonly, nonatomic) NSString *type;
    
    /// A JSON object of arbitrary key-value pairs that may contain metadata, and/or ancillary payloads.
    @property (nullable, readonly, nonatomic) id<ARTJsonCompatible> extras;
    
    - (instancetype)initWithId:(nullable NSString *)annotationId
                        action:(ARTAnnotationAction)action
                      clientId:(nullable NSString *)clientId
                          name:(nullable NSString *)name
                         count:(nullable NSNumber *)count
                          data:(nullable id)data
                      encoding:(nullable NSString *)encoding
                     timestamp:(nullable NSDate *)timestamp
                        serial:(nullable NSString *)serial
                 messageSerial:(NSString *)messageSerial
                          type:(NSString *)type
                        extras:(nullable id<ARTJsonCompatible>)extras;
    
    @end

    Swift

    class ARTAnnotation : NSObject, NSCopying, @unchecked Sendable
  • Creates Ably ARTTokenRequest objects and obtains Ably Tokens from Ably to subsequently issue to less trusted clients.

    See

    See ARTAuthProtocol for details.

    Declaration

    Objective-C

    @interface ARTAuth : NSObject <ARTAuthProtocol>

    Swift

    class ARTAuth : NSObject, ARTAuthProtocol, @unchecked Sendable
  • Contains the token string used to authenticate a client with Ably.

    See more

    Declaration

    Objective-C

    @interface ARTAuthDetails : NSObject <NSCopying>

    Swift

    class ARTAuthDetails : NSObject, NSCopying
  • Passes authentication-specific properties in authentication requests to Ably. Properties set using ARTAuthOptions are used instead of the default values set when the client library is instantiated, as opposed to being merged with them.

    See more

    Declaration

    Objective-C

    @interface ARTAuthOptions : NSObject <NSCopying>

    Swift

    class ARTAuthOptions : NSObject, NSCopying
  • A base interface for an ARTMessage and an ARTPresenceMessage objects.

    See more

    Declaration

    Objective-C

    @interface ARTBaseMessage : NSObject <NSCopying>

    Swift

    class ARTBaseMessage : NSObject, NSCopying
  • Passes additional properties to an ARTRestChannel object, such as encryption.

    See more

    Declaration

    Objective-C

    @interface ARTChannelOptions : NSObject <NSCopying>

    Swift

    class ARTChannelOptions : NSObject, NSCopying
  • Creates and destroys ARTRestChannel and ARTRealtimeChannel objects.

    See more

    Declaration

    Objective-C

    @interface ARTChannels<ChannelType> : NSObject

    Swift

    class ARTChannels<ChannelType> : NSObject, @unchecked Sendable where ChannelType : AnyObject
  • Provides information about the Ably client library and the environment in which it’s running.

    See more

    Declaration

    Objective-C

    @interface ARTClientInformation : NSObject

    Swift

    class ARTClientInformation : NSObject
  • Passes additional client-specific properties to the REST -[ARTRestProtocol initWithOptions:] or the Realtime -[ARTRealtimeProtocol initWithOptions:].

    See more

    Declaration

    Objective-C

    @interface ARTClientOptions : ARTAuthOptions

    Swift

    class ARTClientOptions : ARTAuthOptions
  • Enables the management of a connection to Ably.

    See

    See ARTConnectionProtocol for details.

    Declaration

    Objective-C

    @interface ARTConnection : NSObject <ARTConnectionProtocol>

    Swift

    class ARTConnection : NSObject, ARTConnectionProtocol, @unchecked Sendable
  • Sets the properties to configure encryption for an ARTRestChannel or ARTRealtimeChannel object.

    See more

    Declaration

    Objective-C

    @interface ARTCipherParams : NSObject <ARTCipherParamsCompatible>

    Swift

    class ARTCipherParams : NSObject, ARTCipherParamsCompatible
  • Contains the properties required to configure the encryption of ARTMessage payloads.

    See more

    Declaration

    Objective-C

    @interface ARTCrypto : NSObject

    Swift

    class ARTCrypto : NSObject
  • This object is used for providing parameters into methods with paginated results.

    See more

    Declaration

    Objective-C

    @interface ARTDataQuery : NSObject

    Swift

    class ARTDataQuery : NSObject
  • This object is used for providing parameters into ARTRealtimePresence‘s methods with paginated results.

    See more

    Declaration

    Objective-C

    @interface ARTRealtimeHistoryQuery : ARTDataQuery

    Swift

    class ARTRealtimeHistoryQuery : ARTDataQuery
  • Represents default library settings.

    See more

    Declaration

    Objective-C

    @interface ARTDefault : NSObject

    Swift

    class ARTDefault : NSObject
  • Contains the properties of a device registered for push notifications.

    See more

    Declaration

    Objective-C

    @interface ARTDeviceDetails : NSObject

    Swift

    class ARTDeviceDetails : NSObject, @unchecked Sendable
  • An object representing a unique device identity token used to communicate with APNS.

    See more

    Declaration

    Objective-C

    @interface ARTDeviceIdentityTokenDetails : NSObject <NSSecureCoding>

    Swift

    class ARTDeviceIdentityTokenDetails : NSObject, NSSecureCoding
  • Contains the details of the push registration of a device.

    See more

    Declaration

    Objective-C

    @interface ARTDevicePushDetails : NSObject

    Swift

    class ARTDevicePushDetails : NSObject, @unchecked Sendable
  • An object representing a listener returned by ARTEventEmitter methods.

    Declaration

    Objective-C

    @interface ARTEventListener : NSObject

    Swift

    class ARTEventListener : NSObject, @unchecked Sendable
  • A generic interface for event registration and delivery used in a number of the types in the Realtime client library. For example, the ARTConnection and ARTRealtimeChannel objects emit events for their state using the ARTEventEmitter pattern.

    See more

    Declaration

    Objective-C

    @interface ARTEventEmitter<EventType : id <ARTEventIdentification>, ItemType>
        : NSObject

    Swift

    class ARTEventEmitter<EventType, ItemType> : NSObject, @unchecked Sendable where EventType : ARTEventIdentification, ItemType : AnyObject
  • A superset of ARTPaginatedResult which represents a page of results plus metadata indicating the relative queries available to it. ARTHttpPaginatedResponse additionally carries information about the response to an HTTP request.

    See more

    Declaration

    Objective-C

    @interface ARTHTTPPaginatedResponse : ARTPaginatedResult <NSDictionary *>

    Swift

    class ARTHTTPPaginatedResponse : ARTPaginatedResult<NSDictionary>, @unchecked Sendable
  • Contains the device identity token and secret of a device. ARTLocalDevice extends ARTDeviceDetails.

    See more

    Declaration

    Objective-C

    @interface ARTLocalDevice : ARTDeviceDetails

    Swift

    class ARTLocalDevice : ARTDeviceDetails, @unchecked Sendable
  • Contains an individual message that is sent to, or received from, Ably.

    See more

    Declaration

    Objective-C

    @interface ARTMessage : ARTBaseMessage

    Swift

    class ARTMessage : ARTBaseMessage
  • Contains annotations summary for a message. The keys of the dict are annotation types, and the values are aggregated summaries for that annotation type.

    See more

    Declaration

    Objective-C

    @interface ARTMessageAnnotations : NSObject

    Swift

    class ARTMessageAnnotations : NSObject
  • Contains metadata about a message update or delete operation.

    See more

    Declaration

    Objective-C

    @interface ARTMessageOperation : NSObject

    Swift

    class ARTMessageOperation : NSObject, @unchecked Sendable
  • Contains version information for a message, including operation metadata.

    See more

    Declaration

    Objective-C

    @interface ARTMessageVersion : NSObject

    Swift

    class ARTMessageVersion : NSObject
  • 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.

    See more

    Declaration

    Objective-C

    @interface ARTOutboundAnnotation : NSObject <NSCopying>

    Swift

    class ARTOutboundAnnotation : NSObject, NSCopying, @unchecked Sendable
  • Contains a page of results for message or presence history, stats, or REST presence requests. An ARTPaginatedResult response from a REST API paginated query is also accompanied by metadata that indicates the relative queries available to the ARTPaginatedResult object.

    See more

    Declaration

    Objective-C

    @interface ARTPaginatedResult<ItemType> : NSObject

    Swift

    class ARTPaginatedResult<ItemType> : NSObject, @unchecked Sendable where ItemType : AnyObject
  • Contains an individual presence update sent to, or received from, Ably.

    See more

    Declaration

    Objective-C

    @interface ARTPresenceMessage : ARTBaseMessage

    Swift

    class ARTPresenceMessage : ARTBaseMessage
  • Contains the result of a publish operation.

    See more

    Declaration

    Objective-C

    @interface ARTPublishResult : NSObject

    Swift

    class ARTPublishResult : NSObject, @unchecked Sendable
  • Represents the message serial of a message published to Ably, as contained in an ARTPublishResult.

    See more

    Declaration

    Objective-C

    @interface ARTPublishResultSerial : NSObject

    Swift

    class ARTPublishResultSerial : NSObject, @unchecked Sendable
  • Enables a device to be registered and deregistered from receiving push notifications.

    See more

    Declaration

    Objective-C

    @interface ARTPush : NSObject <ARTPushProtocol>

    Swift

    class ARTPush : NSObject, ARTPushProtocol, @unchecked Sendable
  • Enables the management of device registrations and push notification subscriptions. Also enables the publishing of push notifications to devices.

    See more

    Declaration

    Objective-C

    @interface ARTPushAdmin : NSObject <ARTPushAdminProtocol>

    Swift

    class ARTPushAdmin : NSObject, ARTPushAdminProtocol, @unchecked Sendable
  • Enables devices to subscribe to push notifications for a channel.

    See

    See ARTPushChannelProtocol for details.

    Declaration

    Objective-C

    @interface ARTPushChannel : NSObject <ARTPushChannelProtocol>

    Swift

    class ARTPushChannel : NSObject, ARTPushChannelProtocol, @unchecked Sendable
  • Contains the subscriptions of a device, or a group of devices sharing the same clientId, has to a channel in order to receive push notifications.

    See more

    Declaration

    Objective-C

    @interface ARTPushChannelSubscription : NSObject

    Swift

    class ARTPushChannelSubscription : NSObject
  • Enables device push channel subscriptions.

    Declaration

    Objective-C

    @interface ARTPushChannelSubscriptions
        : NSObject <ARTPushChannelSubscriptionsProtocol>

    Swift

    class ARTPushChannelSubscriptions : NSObject, ARTPushChannelSubscriptionsProtocol, @unchecked Sendable
  • Enables the management of push notification registrations with Ably.

    See

    See ARTPushDeviceRegistrationsProtocol for details.

    Declaration

    Objective-C

    @interface ARTPushDeviceRegistrations
        : NSObject <ARTPushDeviceRegistrationsProtocol>

    Swift

    class ARTPushDeviceRegistrations : NSObject, ARTPushDeviceRegistrationsProtocol, @unchecked Sendable
  • A client that extends the functionality of the ARTRest and provides additional realtime-specific features.

    See more

    Declaration

    Objective-C

    @interface ARTRealtime : NSObject <ARTRealtimeProtocol>

    Swift

    class ARTRealtime : NSObject, ARTRealtimeProtocol, @unchecked Sendable
  • See

    See ARTRealtimeAnnotationsProtocol for details.

    Declaration

    Objective-C

    @interface ARTRealtimeAnnotations : NSObject <ARTRealtimeAnnotationsProtocol>

    Swift

    class ARTRealtimeAnnotations : NSObject, ARTRealtimeAnnotationsProtocol, @unchecked Sendable
  • Describes the properties of the channel state.

    See more

    Declaration

    Objective-C

    @interface ARTChannelProperties : NSObject

    Swift

    class ARTChannelProperties : NSObject
  • Enables messages to be published and subscribed to. Also enables historic messages to be retrieved and provides access to the ARTRealtimePresence object of a channel. Also implements ARTEventEmitter interface and emits ARTChannelEvent events, where a ARTChannelEvent is either a ARTRealtimeChannelState or an ARTChannelEvent.ARTChannelEventUpdate.

    See more

    Declaration

    Objective-C

    @interface ARTRealtimeChannel : NSObject <ARTRealtimeChannelProtocol>

    Swift

    class ARTRealtimeChannel : NSObject, ARTRealtimeChannelProtocol, @unchecked Sendable
  • Passes additional properties to an ARTRealtimeChannel object, such as encryption, an ARTChannelMode and channel parameters.

    See more

    Declaration

    Objective-C

    @interface ARTRealtimeChannelOptions : ARTChannelOptions

    Swift

    class ARTRealtimeChannelOptions : ARTChannelOptions
  • This object is used for providing parameters into ARTRealtimePresence‘s methods with paginated results.

    See more

    Declaration

    Objective-C

    @interface ARTRealtimePresenceQuery : ARTPresenceQuery

    Swift

    class ARTRealtimePresenceQuery : ARTPresenceQuery
  • Enables the presence set to be entered and subscribed to, and the historic presence set to be retrieved for a channel.

    See

    See ARTRealtimePresenceProtocol for details.

    Declaration

    Objective-C

    @interface ARTRealtimePresence : ARTPresence <ARTRealtimePresenceProtocol>

    Swift

    class ARTRealtimePresence : ARTPresence, ARTRealtimePresenceProtocol, @unchecked Sendable
  • A client that offers a simple stateless API to interact directly with Ably’s REST API.

    See more

    Declaration

    Objective-C

    @interface ARTRest : NSObject <ARTRestProtocol>

    Swift

    class ARTRest : NSObject, ARTRestProtocol, @unchecked Sendable
  • This object is used for providing parameters into ARTRestAnnotations‘s methods with paginated results.

    See more

    Declaration

    Objective-C

    @interface ARTAnnotationsQuery : NSObject

    Swift

    class ARTAnnotationsQuery : NSObject, @unchecked Sendable
  • Functionality for annotating messages with small pieces of data, such as emoji reactions, that the server will roll up into the message as a summary.

    See

    See ARTRestAnnotationsProtocol for details.

    Declaration

    Objective-C

    @interface ARTRestAnnotations : NSObject <ARTRestAnnotationsProtocol>

    Swift

    class ARTRestAnnotations : NSObject, ARTRestAnnotationsProtocol, @unchecked Sendable
  • Enables messages to be published and historic messages to be retrieved for a channel.

    See more

    Declaration

    Objective-C

    @interface ARTRestChannel : NSObject <ARTRestChannelProtocol>

    Swift

    class ARTRestChannel : NSObject, ARTRestChannelProtocol, @unchecked Sendable
  • This object is used for providing parameters into ARTRestPresence‘s methods with paginated results.

    See more

    Declaration

    Objective-C

    @interface ARTPresenceQuery : NSObject

    Swift

    class ARTPresenceQuery : NSObject
  • Enables the retrieval of the current and historic presence set for a channel.

    See

    See ARTRestPresenceProtocol for details.

    Declaration

    Objective-C

    @interface ARTRestPresence : ARTPresence <ARTRestPresenceProtocol>

    Swift

    class ARTRestPresence : ARTPresence, ARTRestPresenceProtocol, @unchecked Sendable
  • This object is used for providing parameters into ARTStats‘s methods with paginated results.

    See more

    Declaration

    Objective-C

    @interface ARTStatsQuery : ARTDataQuery

    Swift

    class ARTStatsQuery : ARTDataQuery
  • Contains the aggregate counts for messages and data transferred.

    See more

    Declaration

    Objective-C

    @interface ARTStatsMessageCount : NSObject

    Swift

    class ARTStatsMessageCount : NSObject
  • Contains a breakdown of summary stats data for different (channel vs presence) message types.

    See more

    Declaration

    Objective-C

    @interface ARTStatsMessageTypes : NSObject

    Swift

    class ARTStatsMessageTypes : NSObject
  • Contains a breakdown of summary stats data for traffic over various transport types.

    See more

    Declaration

    Objective-C

    @interface ARTStatsMessageTraffic : NSObject

    Swift

    class ARTStatsMessageTraffic : NSObject
  • Contains the aggregate data for usage of a resource in a specific scope.

    See more

    Declaration

    Objective-C

    @interface ARTStatsResourceCount : NSObject

    Swift

    class ARTStatsResourceCount : NSObject
  • Contains a breakdown of summary stats data for different (TLS vs non-TLS) connection types.

    See more

    Declaration

    Objective-C

    @interface ARTStatsConnectionTypes : NSObject

    Swift

    class ARTStatsConnectionTypes : NSObject
  • Contains the aggregate counts for requests made.

    See more

    Declaration

    Objective-C

    @interface ARTStatsRequestCount : NSObject

    Swift

    class ARTStatsRequestCount : NSObject
  • Details the stats on push notifications.

    See more

    Declaration

    Objective-C

    @interface ARTStatsPushCount : NSObject

    Swift

    class ARTStatsPushCount : NSObject
  • Contains application statistics for a specified time interval and time period.

    See more

    Declaration

    Objective-C

    @interface ARTStats : NSObject

    Swift

    class ARTStats : NSObject
  • A generic Ably error object that contains an Ably-specific status code, and a generic status code. Errors returned from the Ably server are compatible with the ARTErrorInfo structure and should result in errors that inherit from ARTErrorInfo.

    See

    For possible NSError.code see Ably error codes.
    See more

    Declaration

    Objective-C

    @interface ARTErrorInfo : NSError

    Swift

    class ARTErrorInfo : NSError
  • Summary with total count and list of client IDs.

    See more

    Declaration

    Objective-C

    @interface ARTSummaryClientIdList : NSObject

    Swift

    class ARTSummaryClientIdList : NSObject, @unchecked Sendable
  • Summary with total count and dictionary mapping client IDs to counts.

    See more

    Declaration

    Objective-C

    @interface ARTSummaryClientIdCounts : NSObject

    Swift

    class ARTSummaryClientIdCounts : NSObject, @unchecked Sendable
  • Summary with only total count.

    See more

    Declaration

    Objective-C

    @interface ARTSummaryTotal : NSObject

    Swift

    class ARTSummaryTotal : NSObject, @unchecked Sendable
  • Contains an Ably Token and its associated metadata.

    See more

    Declaration

    Objective-C

    @interface ARTTokenDetails : NSObject <NSCopying>

    Swift

    class ARTTokenDetails : NSObject, NSCopying
  • Defines the properties of an Ably Token.

    See more

    Declaration

    Objective-C

    @interface ARTTokenParams : NSObject <NSCopying>

    Swift

    class ARTTokenParams : NSObject, NSCopying
  • Contains the properties of a request for a token to Ably. Tokens are generated using -[ARTAuthProtocol requestToken:].

    See more

    Declaration

    Objective-C

    @interface ARTTokenRequest : NSObject

    Swift

    class ARTTokenRequest : NSObject
  • Contains ARTRealtimeConnectionState change information emitted by the ARTConnection object.

    See more

    Declaration

    Objective-C

    @interface ARTConnectionStateChange : NSObject

    Swift

    class ARTConnectionStateChange : NSObject, @unchecked Sendable
  • Contains state change information emitted by an ARTRealtimeChannel object.

    See more

    Declaration

    Objective-C

    @interface ARTChannelStateChange : NSObject

    Swift

    class ARTChannelStateChange : NSObject, @unchecked Sendable
  • Contains the metrics associated with a ARTRestChannel or ARTRealtimeChannel, such as the number of publishers, subscribers and connections it has.

    See more

    Declaration

    Objective-C

    @interface ARTChannelMetrics : NSObject

    Swift

    class ARTChannelMetrics : NSObject, @unchecked Sendable
  • Contains the metrics of a ARTRestChannel or ARTRealtimeChannel object.

    See more

    Declaration

    Objective-C

    @interface ARTChannelOccupancy : NSObject

    Swift

    class ARTChannelOccupancy : NSObject, @unchecked Sendable
  • Contains the status of a ARTRestChannel or ARTRealtimeChannel object such as whether it is active and its ARTChannelOccupancy.

    See more

    Declaration

    Objective-C

    @interface ARTChannelStatus : NSObject

    Swift

    class ARTChannelStatus : NSObject, @unchecked Sendable
  • Contains the details of a ARTRestChannel or ARTRealtimeChannel object such as its ID and ARTChannelStatus.

    See more

    Declaration

    Objective-C

    @interface ARTChannelDetails : NSObject

    Swift

    class ARTChannelDetails : NSObject, @unchecked Sendable
  • Contains the result of an update or delete message operation.

    See more

    Declaration

    Objective-C

    @interface ARTUpdateDeleteResult : NSObject

    Swift

    class ARTUpdateDeleteResult : NSObject, @unchecked Sendable