ARTRealtimeProtocol

Objective-C

@protocol ARTRealtimeProtocol <ARTRealtimeInstanceMethodsProtocol>

Swift

protocol ARTRealtimeProtocol : ARTRealtimeInstanceMethodsProtocol

The protocol upon which the top level object ARTRealtime is implemented.

  • Constructs an ARTRealtime object using an Ably ARTClientOptions object.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithOptions:(nonnull ARTClientOptions *)options;

    Swift

    init(options: ARTClientOptions)

    Parameters

    options

    An ARTClientOptions object.

  • Constructs an ARTRealtime object using an Ably API key.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithKey:(nonnull NSString *)key;

    Swift

    init(key: String)

    Parameters

    key

    The Ably API key used to validate the client.

  • Constructs an ARTRealtime object using an Ably token string.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithToken:(nonnull NSString *)token;

    Swift

    init(token: String)

    Parameters

    token

    The Ably token string used to validate the client.