TwilioConversationsClientDelegate Protocol Reference
| Conforms to | NSObject |
|---|---|
| Declared in | TwilioConversationsClient.h |
– conversationsClient:connectionStateUpdated:
Called when the client connection state changes.
- (void)conversationsClient:(nonnull TwilioConversationsClient *)client connectionStateUpdated:(TCHClientConnectionState)stateParameters
client |
The conversations client. |
|---|---|
state |
The current connection state of the client. |
Discussion
Called when the client connection state changes.
Declared In
TwilioConversationsClient.h
– conversationsClientTokenExpired:
Called when the client’s token has expired.
- (void)conversationsClientTokenExpired:(nonnull TwilioConversationsClient *)clientParameters
client |
The conversations client. |
|---|
Discussion
Called when the client’s token has expired.
In response, your delegate should generate a new token and call
conversationsClient:updateToken:completion: immediately as connection to
the server has been lost.
Declared In
TwilioConversationsClient.h
– conversationsClientTokenWillExpire:
Called when the client’s token will expire soon.
- (void)conversationsClientTokenWillExpire:(nonnull TwilioConversationsClient *)clientParameters
client |
The conversations client. |
|---|
Discussion
Called when the client’s token will expire soon.
In response, your delegate should generate a new token and call
conversationsClient:updateToken:completion: as soon as possible.
Declared In
TwilioConversationsClient.h
– conversationsClient:synchronizationStatusUpdated:
Called when the client synchronization state changes during startup.
- (void)conversationsClient:(nonnull TwilioConversationsClient *)client synchronizationStatusUpdated:(TCHClientSynchronizationStatus)statusParameters
client |
The conversations client. |
|---|---|
status |
The current synchronization status of the client. |
Discussion
Called when the client synchronization state changes during startup.
Declared In
TwilioConversationsClient.h
– conversationsClient:conversationAdded:
Called when the current user has a conversation added to their conversation list.
- (void)conversationsClient:(nonnull TwilioConversationsClient *)client conversationAdded:(nonnull TCHConversation *)conversationParameters
client |
The conversations client. |
|---|---|
conversation |
The conversation. |
Discussion
Called when the current user has a conversation added to their conversation list.
Declared In
TwilioConversationsClient.h
– conversationsClient:conversation:updated:
Called when one of the current users conversations is changed.
- (void)conversationsClient:(nonnull TwilioConversationsClient *)client conversation:(nonnull TCHConversation *)conversation updated:(TCHConversationUpdate)updatedParameters
client |
The conversations client. |
|---|---|
conversation |
The conversation. |
updated |
An indication of what changed on the conversation. |
Discussion
Called when one of the current users conversations is changed.
Declared In
TwilioConversationsClient.h
– conversationsClient:conversation:synchronizationStatusUpdated:
Called when a conversation the current the client is aware of changes synchronization state.
- (void)conversationsClient:(nonnull TwilioConversationsClient *)client conversation:(nonnull TCHConversation *)conversation synchronizationStatusUpdated:(TCHConversationSynchronizationStatus)statusParameters
client |
The conversations client. |
|---|---|
conversation |
The conversation. |
status |
The current synchronization status of the conversation. |
Discussion
Called when a conversation the current the client is aware of changes synchronization state.
Declared In
TwilioConversationsClient.h
– conversationsClient:conversationDeleted:
Called when one of the current users conversations is deleted.
- (void)conversationsClient:(nonnull TwilioConversationsClient *)client conversationDeleted:(nonnull TCHConversation *)conversationParameters
client |
The conversations client. |
|---|---|
conversation |
The conversation. |
Discussion
Called when one of the current users conversations is deleted.
Declared In
TwilioConversationsClient.h
– conversationsClient:conversation:participantJoined:
Called when a conversation the current user is subscribed to has a new participant join.
- (void)conversationsClient:(nonnull TwilioConversationsClient *)client conversation:(nonnull TCHConversation *)conversation participantJoined:(nonnull TCHParticipant *)participantParameters
client |
The conversations client. |
|---|---|
conversation |
The conversation. |
participant |
The participant. |
Discussion
Called when a conversation the current user is subscribed to has a new participant join.
Declared In
TwilioConversationsClient.h
– conversationsClient:conversation:participant:updated:
Called when a conversation the current user is subscribed to has a participant modified.
- (void)conversationsClient:(nonnull TwilioConversationsClient *)client conversation:(nonnull TCHConversation *)conversation participant:(nonnull TCHParticipant *)participant updated:(TCHParticipantUpdate)updatedParameters
client |
The conversations client. |
|---|---|
conversation |
The conversation. |
participant |
The participant. |
updated |
An indication of what changed on the participant. |
Discussion
Called when a conversation the current user is subscribed to has a participant modified.
Declared In
TwilioConversationsClient.h
– conversationsClient:conversation:participantLeft:
Called when a conversation the current user is subscribed to has a participant leave.
- (void)conversationsClient:(nonnull TwilioConversationsClient *)client conversation:(nonnull TCHConversation *)conversation participantLeft:(nonnull TCHParticipant *)participantParameters
client |
The conversations client. |
|---|---|
conversation |
The conversation. |
participant |
The participant. |
Discussion
Called when a conversation the current user is subscribed to has a participant leave.
Declared In
TwilioConversationsClient.h
– conversationsClient:conversation:messageAdded:
Called when a conversation the current user is subscribed to receives a new message.
- (void)conversationsClient:(nonnull TwilioConversationsClient *)client conversation:(nonnull TCHConversation *)conversation messageAdded:(nonnull TCHMessage *)messageParameters
client |
The conversations client. |
|---|---|
conversation |
The conversation. |
message |
The message. |
Discussion
Called when a conversation the current user is subscribed to receives a new message.
Declared In
TwilioConversationsClient.h
– conversationsClient:conversation:message:updated:
Called when a message on a conversation the current user is subscribed to is modified.
- (void)conversationsClient:(nonnull TwilioConversationsClient *)client conversation:(nonnull TCHConversation *)conversation message:(nonnull TCHMessage *)message updated:(TCHMessageUpdate)updatedParameters
client |
The conversations client. |
|---|---|
conversation |
The conversation. |
message |
The message. |
updated |
An indication of what changed on the message. |
Discussion
Called when a message on a conversation the current user is subscribed to is modified.
Declared In
TwilioConversationsClient.h
– conversationsClient:conversation:messageDeleted:
Called when a message on a conversation the current user is subscribed to is deleted.
- (void)conversationsClient:(nonnull TwilioConversationsClient *)client conversation:(nonnull TCHConversation *)conversation messageDeleted:(nonnull TCHMessage *)messageParameters
client |
The conversations client. |
|---|---|
conversation |
The conversation. |
message |
The message. |
Discussion
Called when a message on a conversation the current user is subscribed to is deleted.
Declared In
TwilioConversationsClient.h
– conversationsClient:errorReceived:
Called when an error occurs.
- (void)conversationsClient:(nonnull TwilioConversationsClient *)client errorReceived:(nonnull TCHError *)errorParameters
client |
The conversations client. |
|---|---|
error |
The error. |
Discussion
Called when an error occurs.
Declared In
TwilioConversationsClient.h
– conversationsClient:typingStartedOnConversation:participant:
Called when a participant of a conversation starts typing.
- (void)conversationsClient:(nonnull TwilioConversationsClient *)client typingStartedOnConversation:(nonnull TCHConversation *)conversation participant:(nonnull TCHParticipant *)participantParameters
client |
The conversations client. |
|---|---|
conversation |
The conversation. |
participant |
The participant. |
Discussion
Called when a participant of a conversation starts typing.
Declared In
TwilioConversationsClient.h
– conversationsClient:typingEndedOnConversation:participant:
Called when a participant of a conversation ends typing.
- (void)conversationsClient:(nonnull TwilioConversationsClient *)client typingEndedOnConversation:(nonnull TCHConversation *)conversation participant:(nonnull TCHParticipant *)participantParameters
client |
The conversations client. |
|---|---|
conversation |
The conversation. |
participant |
The participant. |
Discussion
Called when a participant of a conversation ends typing.
Declared In
TwilioConversationsClient.h
– conversationsClient:notificationNewMessageReceivedForConversationSid:messageIndex:
Called as a result of TwilioConversationsClient’s handleNotification: method being invoked for a new message received notification. handleNotification: parses the push payload and extracts the new message’s conversation and index for the push notification then calls this delegate method.
- (void)conversationsClient:(nonnull TwilioConversationsClient *)client notificationNewMessageReceivedForConversationSid:(nonnull NSString *)conversationSid messageIndex:(NSUInteger)messageIndexParameters
client |
The conversations client. |
|---|---|
conversationSid |
The conversation sid for the new message. |
messageIndex |
The index of the new message. |
Discussion
Called as a result of TwilioConversationsClient’s handleNotification: method being invoked for a new message received notification. handleNotification: parses the push payload and extracts the new message’s conversation and index for the push notification then calls this delegate method.
Declared In
TwilioConversationsClient.h
– conversationsClient:notificationAddedToConversationWithSid:
Called as a result of TwilioConversationsClient’s handleNotification: method being invoked for an added to conversation notification. handleNotification: parses the push payload and extracts the conversation for the push notification then calls this delegate method.
- (void)conversationsClient:(nonnull TwilioConversationsClient *)client notificationAddedToConversationWithSid:(nonnull NSString *)conversationSidParameters
client |
The conversations client. |
|---|---|
conversationSid |
The conversation sid for the newly added conversation. |
Discussion
Called as a result of TwilioConversationsClient’s handleNotification: method being invoked for an added to conversation notification. handleNotification: parses the push payload and extracts the conversation for the push notification then calls this delegate method.
Declared In
TwilioConversationsClient.h
– conversationsClient:notificationRemovedFromConversationWithSid:
Called as a result of TwilioConversationsClient’s handleNotification: method being invoked for a removed from conversation notification. handleNotification: parses the push payload and extracts the conversation for the push notification then calls this delegate method.
- (void)conversationsClient:(nonnull TwilioConversationsClient *)client notificationRemovedFromConversationWithSid:(nonnull NSString *)conversationSidParameters
client |
The conversations client. |
|---|---|
conversationSid |
The conversation sid for the removed conversation. |
Discussion
Called as a result of TwilioConversationsClient’s handleNotification: method being invoked for a removed from conversation notification. handleNotification: parses the push payload and extracts the conversation for the push notification then calls this delegate method.
Declared In
TwilioConversationsClient.h
– conversationsClient:notificationUpdatedBadgeCount:
Called when a processed push notification has changed the application’s badge count. You should call:
- (void)conversationsClient:(nonnull TwilioConversationsClient *)client notificationUpdatedBadgeCount:(NSUInteger)badgeCountParameters
client |
The conversations client. |
|---|---|
badgeCount |
The updated badge count. |
Discussion
Called when a processed push notification has changed the application’s badge count. You should call:
UIApplication.sharedApplication.applicationIconBadgeNumber = badgeCount
Please note that badge count indicates the number of 1:1 (2 participant only) conversations that have unread messages. This will not reflect total unread message count or conversations with more than 2 participants.
To ensure your application’s badge updates when the application is in the foreground if Twilio is managing your badge counts. You may disregard this delegate callback otherwise.
Declared In
TwilioConversationsClient.h
– conversationsClient:user:updated:
Called when the current user’s or that of any subscribed conversation participant’s user is updated.
- (void)conversationsClient:(nonnull TwilioConversationsClient *)client user:(nonnull TCHUser *)user updated:(TCHUserUpdate)updatedParameters
client |
The conversations client. |
|---|---|
user |
The object for changed user. |
updated |
An indication of what changed on the user. |
Discussion
Called when the current user’s or that of any subscribed conversation participant’s user is updated.
Declared In
TwilioConversationsClient.h
– conversationsClient:userSubscribed:
Called when the client subscribes to updates for a given user.
- (void)conversationsClient:(nonnull TwilioConversationsClient *)client userSubscribed:(nonnull TCHUser *)userParameters
client |
The conversations client. |
|---|---|
user |
The object for subscribed user. |
Discussion
Called when the client subscribes to updates for a given user.
Declared In
TwilioConversationsClient.h
– conversationsClient:userUnsubscribed:
Called when the client unsubscribes from updates for a given user.
- (void)conversationsClient:(nonnull TwilioConversationsClient *)client userUnsubscribed:(nonnull TCHUser *)userParameters
client |
The conversations client. |
|---|---|
user |
The object for unsubscribed user. |
Discussion
Called when the client unsubscribes from updates for a given user.
Declared In
TwilioConversationsClient.h