TwilioChatClient Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | TwilioChatClient.h |
delegate
Messaging client delegate
@property (nonatomic, weak) id<TwilioChatClientDelegate> delegateDiscussion
Messaging client delegate
Declared In
TwilioChatClient.h
user
The logged in user in the chat system.
@property (nonatomic, strong, readonly) TCHUser *userDiscussion
The logged in user in the chat system.
Declared In
TwilioChatClient.h
connectionState
The client’s current connection state.
@property (nonatomic, assign, readonly) TCHClientConnectionState connectionStateDiscussion
The client’s current connection state.
Declared In
TwilioChatClient.h
synchronizationStatus
The current client synchronization state.
@property (nonatomic, assign, readonly) TCHClientSynchronizationStatus synchronizationStatusDiscussion
The current client synchronization state.
Declared In
TwilioChatClient.h
+ setLogLevel:
Sets the logging level for the client.
+ (void)setLogLevel:(TCHLogLevel)logLevelParameters
logLevel |
The new log level. |
|---|
Discussion
Sets the logging level for the client.
Declared In
TwilioChatClient.h
+ logLevel
The logging level for the client.
+ (TCHLogLevel)logLevelReturn Value
The log level.
Discussion
The logging level for the client.
Declared In
TwilioChatClient.h
+ chatClientWithToken:properties:delegate:completion:
Initialize a new chat client instance.
+ (void)chatClientWithToken:(NSString *)token properties:(TwilioChatClientProperties *)properties delegate:(id<TwilioChatClientDelegate>)delegate completion:(TCHTwilioClientCompletion)completionParameters
token |
The client access token to use when communicating with Twilio. |
|---|---|
properties |
The properties to initialize the client with, if this is nil defaults will be used. |
delegate |
Delegate conforming to TwilioChatClientDelegate for chat client lifecycle notifications. |
completion |
Completion block that will specify the result of the operation and a reference to the new TwilioChatClient. |
Discussion
Initialize a new chat client instance.
Declared In
TwilioChatClient.h
– version
Returns the version of the SDK
- (NSString *)versionReturn Value
The chat client version.
Discussion
Returns the version of the SDK
Declared In
TwilioChatClient.h
– updateToken:completion:
Updates the access token currently being used by the client.
- (void)updateToken:(NSString *)token completion:(TCHCompletion)completionParameters
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
TwilioChatClient.h
– channelsList
List of channels available to the current user.
- (TCHChannels *)channelsListReturn Value
The channelsList object.
Discussion
List of channels available to the current user.
This will be nil until the client is fully initialized, see the client delegate callback chatClient:synchronizationStatusUpdated:
Declared In
TwilioChatClient.h
– registerWithNotificationToken:completion:
Register APNS token for push notification updates.
- (void)registerWithNotificationToken:(NSData *)token completion:(TCHCompletion)completionParameters
token |
The APNS token which usually comes from |
|---|---|
completion |
Completion block that will specify the result of the operation. |
Discussion
Register APNS token for push notification updates.
Declared In
TwilioChatClient.h
– deregisterWithNotificationToken:completion:
De-register from push notification updates.
- (void)deregisterWithNotificationToken:(NSData *)token completion:(TCHCompletion)completionParameters
token |
The APNS token which usually comes from |
|---|---|
completion |
Completion block that will specify the result of the operation. |
Discussion
De-register from push notification updates.
Declared In
TwilioChatClient.h
– handleNotification:completion:
Queue the incoming notification with the messaging library for processing - notifications usually arrive from didReceiveRemoteNotification.
- (void)handleNotification:(NSDictionary *)notification completion:(TCHCompletion)completionParameters
notification |
The incomming notification. |
|---|---|
completion |
Completion block that will specify the result of the operation. |
Discussion
Queue the incoming notification with the messaging library for processing - notifications usually arrive from didReceiveRemoteNotification.
Declared In
TwilioChatClient.h
– isReachabilityEnabled
Indicates whether reachability is enabled for this instance.
- (BOOL)isReachabilityEnabledReturn Value
YES if reachability is enabled.
Discussion
Indicates whether reachability is enabled for this instance.
Declared In
TwilioChatClient.h
– shutdown
Cleanly shut down the messaging subsystem when you are done with it.
- (void)shutdownDiscussion
Cleanly shut down the messaging subsystem when you are done with it.
Declared In
TwilioChatClient.h