TwilioSyncClient Class Reference

Inherits from NSObject
Declared in TWSSyncClient.h

Overview

Represents a Sync client connection to Twilio.

  logLevel

The logging level for the client.

@property (class, readonly) TWSLogLevel logLevel

Discussion

The logging level for the client.

Declared In

TWSSyncClient.h

  sdkName

The name of the SDK for diagnostic purposes.

@property (class, readonly, nonnull) NSString *sdkName

Discussion

The name of the SDK for diagnostic purposes.

Declared In

TWSSyncClient.h

  sdkVersion

The version of the SDK.

@property (class, readonly, nonnull) NSString *sdkVersion

Discussion

The version of the SDK.

Declared In

TWSSyncClient.h

  delegate

The sync client delegate.

@property (nonatomic, weak, nullable) id<TwilioSyncClientDelegate> delegate

Discussion

The sync client delegate.

Declared In

TWSSyncClient.h

  connectionState

The client’s current connection state.

@property (nonatomic, assign, readonly) TWSClientConnectionState connectionState

Discussion

The client’s current connection state.

Declared In

TWSSyncClient.h

  dispatchQueue

Queue all completions and events would fire from. If not set here or in properties on a client creation, main queue would be used.

@property (nonatomic, readwrite, nullable) dispatch_queue_t dispatchQueue

Discussion

Queue all completions and events would fire from. If not set here or in properties on a client creation, main queue would be used.

Declared In

TWSSyncClient.h

+ syncClientWithToken:properties:delegate:completion:

Initialize a new Sync client instance with a token manager.

+ (void)syncClientWithToken:(nonnull NSString *)token properties:(nullable TwilioSyncClientProperties *)properties delegate:(nullable id<TwilioSyncClientDelegate>)delegate completion:(nonnull TWSTwilioClientCompletion)completion

Parameters

token

The client access token to use when communicating with Twilio.

properties

The initialization parameter for the Sync client.

delegate

Delegate conforming to TwilioSyncClientDelegate for Sync client lifecycle notifications.

completion

Completion block that will specify the result of the operation and a reference to the new TwilioSyncClient.

Discussion

Initialize a new Sync client instance with a token manager.

Declared In

TWSSyncClient.h

+ setLogLevel:

Sets the logging level for the client.

+ (void)setLogLevel:(TWSLogLevel)logLevel

Parameters

logLevel

The new log level.

Discussion

Sets the logging level for the client.

Declared In

TWSSyncClient.h

– updateToken:completion:

Updates the access token currently being used by the client.

- (void)updateToken:(nonnull NSString *)token completion:(nonnull TWSCompletion)completion

Parameters

token

The updated client access token to use when communicating with Twilio.

completion

Completion block that will specify the result of the operation.

Discussion

Updates the access token currently being used by the client.

Declared In

TWSSyncClient.h

– shutdown

Cleanly shut down the sync client when you are done with it.

- (void)shutdown

Discussion

Cleanly shut down the sync client when you are done with it.

Declared In

TWSSyncClient.h

– openDocumentWithOptions:delegate:completion:

Open or create a document.

- (void)openDocumentWithOptions:(nonnull TWSOpenOptions *)options delegate:(nonnull id<TWSDocumentDelegate>)delegate completion:(nonnull TWSDocumentCompletion)completion

Parameters

options

An instance of TSOptions which specify the document to open or create.

delegate

Delegate for operations related to this document.

completion

Completion block that will specify the result of the operation and a reference to the document.

Discussion

Open or create a document.

Declared In

TWSSyncClient.h

– openListWithOptions:delegate:completion:

Open or create a list.

- (void)openListWithOptions:(nonnull TWSOpenOptions *)options delegate:(nonnull id<TWSListDelegate>)delegate completion:(nonnull TWSListCompletion)completion

Parameters

options

An instance of TSOptions which specify the list to open or create.

delegate

Delegate for operations related to this list.

completion

Completion block that will specify the result of the operation and a reference to the list.

Discussion

Open or create a list.

Declared In

TWSSyncClient.h

– openMapWithOptions:delegate:completion:

Open or create a map.

- (void)openMapWithOptions:(nonnull TWSOpenOptions *)options delegate:(nonnull id<TWSMapDelegate>)delegate completion:(nonnull TWSMapCompletion)completion

Parameters

options

An instance of TSOptions which specify the map to open or create.

delegate

Delegate for operations related to this map.

completion

Completion block that will specify the result of the operation and a reference to the map.

Discussion

Open or create a map.

Declared In

TWSSyncClient.h

– openStreamWithOptions:delegate:completion:

Open or create a stream.

- (void)openStreamWithOptions:(nonnull TWSOpenOptions *)options delegate:(nonnull id<TWSStreamDelegate>)delegate completion:(nonnull TWSStreamCompletion)completion

Parameters

options

An instance of TSOptions which specify the stream to open or create.

delegate

Delegate for operations related to this stream.

completion

Completion block that will specify the result of the operation and a reference to the stream.

Discussion

Open or create a stream.

Declared In

TWSSyncClient.h