TwilioSyncClient Class Reference
Inherits from | NSObject |
---|---|
Declared in | TwilioSyncClient.h |
delegate
Sync client delegate
@property (nonatomic, weak, nullable) id<TwilioSyncClientDelegate> delegate
Discussion
Sync client delegate
Declared In
TwilioSyncClient.h
connectionState
The client’s current connection state.
@property (nonatomic, assign, readonly) TWSClientConnectionState connectionState
Discussion
The client’s current connection state.
Declared In
TwilioSyncClient.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. |
Return Value
New Sync client instance.
Discussion
Initialize a new Sync client instance with a token manager.
Declared In
TwilioSyncClient.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
TwilioSyncClient.h
+ logLevel
The logging level for the client.
+ (TWSLogLevel)logLevel
Return Value
The log level.
Discussion
The logging level for the client.
Declared In
TwilioSyncClient.h
– version
Returns the version of the SDK
- (nonnull NSString *)version
Return Value
The Sync client version.
Discussion
Returns the version of the SDK
Declared In
TwilioSyncClient.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
TwilioSyncClient.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
TwilioSyncClient.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
TwilioSyncClient.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
TwilioSyncClient.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
TwilioSyncClient.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
TwilioSyncClient.h