TwilioChatClient Class Reference
Inherits from | NSObject |
---|---|
Declared in | TwilioChatClient.h |
delegate
Messaging client delegate
@property (nonatomic, weak, nullable) id<TwilioChatClientDelegate> delegate
Discussion
Messaging client delegate
Declared In
TwilioChatClient.h
user
The logged in user in the chat system.
@property (nonatomic, strong, readonly, nullable) TCHUser *user
Discussion
The logged in user in the chat system.
Declared In
TwilioChatClient.h
connectionState
The client’s current connection state.
@property (nonatomic, assign, readonly) TCHClientConnectionState connectionState
Discussion
The client’s current connection state.
Declared In
TwilioChatClient.h
synchronizationStatus
The current client synchronization state.
@property (nonatomic, assign, readonly) TCHClientSynchronizationStatus synchronizationStatus
Discussion
The current client synchronization state.
Declared In
TwilioChatClient.h
+ setLogLevel:
Sets the logging level for the client.
+ (void)setLogLevel:(TCHLogLevel)logLevel
Parameters
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)logLevel
Return 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:(nonnull NSString *)token properties:(nullable TwilioChatClientProperties *)properties delegate:(nullable id<TwilioChatClientDelegate>)delegate completion:(nonnull TCHTwilioClientCompletion)completion
Parameters
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
+ sdkName
Returns the name of the SDK for diagnostic purposes.
+ (nonnull NSString *)sdkName
Return Value
An identifier for the Chat SDK.
Discussion
Returns the name of the SDK for diagnostic purposes.
Declared In
TwilioChatClient.h
– version
Returns the version of the SDK (Deprecated: Please see the class method sdkVersion.)
- (nonnull NSString *)version
Return 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:(nonnull NSString *)token completion:(nullable TCHCompletion)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
TwilioChatClient.h
– channelsList
List of channels available to the current user.
- (nullable TCHChannels *)channelsList
Return 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:(nonnull NSData *)token completion:(nullable TCHCompletion)completion
Parameters
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:(nonnull NSData *)token completion:(nullable TCHCompletion)completion
Parameters
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:(nonnull NSDictionary *)notification completion:(nullable TCHCompletion)completion
Parameters
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)isReachabilityEnabled
Return 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)shutdown
Discussion
Cleanly shut down the messaging subsystem when you are done with it.
Declared In
TwilioChatClient.h