LCIMClientDelegate
Objective-C
@protocol LCIMClientDelegate <NSObject>
Swift
protocol LCIMClientDelegate : NSObjectProtocol
This protocol defines methods to handle the events about client, conversation, message and so on.
-
Client paused, means the connection lost.
Common Scenario: * Network unreachable or interface changed. * App enter background * …
Declaration
Objective-C
- (void)imClientPaused:(nonnull LCIMClient *)imClient error:(NSError *_Nullable)error;Swift
optional func imClientPaused(_ imClient: LCIMClient, error: Error?)Parameters
imClientThe client.
errorThe reason for pause.
-
Client in resuming, invoked when the client try recover connection automatically.
Declaration
Objective-C
- (void)imClientResuming:(nonnull LCIMClient *)imClient;Swift
optional func imClientResuming(_ imClient: LCIMClient)Parameters
imClientThe client.
-
Client resumed, means the client recover connection successfully.
Declaration
Objective-C
- (void)imClientResumed:(nonnull LCIMClient *)imClient;Swift
optional func imClientResumed(_ imClient: LCIMClient)Parameters
imClientThe client.
-
Client closed and will not try recover connection automatically.
Common Scenario: * code:
4111, reason:SESSION_CONFLICT* code:4115, reason:KICKED_BY_APPDeclaration
Objective-C
- (void)imClientClosed:(nonnull LCIMClient *)imClient error:(NSError *_Nullable)error;Swift
optional func imClientClosed(_ imClient: LCIMClient, error: Error?)Parameters
imClientThe client.
errorThe reason for close.
-
Undocumented
Declaration
Objective-C
- (void)conversation:(nonnull LCIMConversation *)conversation didReceiveCommonMessage:(nonnull LCIMMessage *)message;Swift
optional func conversation(_ conversation: LCIMConversation, didReceiveCommonMessage message: LCIMMessage) -
Undocumented
Declaration
Objective-C
- (void)conversation:(nonnull LCIMConversation *)conversation didReceiveTypedMessage:(nonnull LCIMTypedMessage *)message;Swift
optional func conversation(_ conversation: LCIMConversation, didReceive message: LCIMTypedMessage) -
Undocumented
Declaration
Objective-C
- (void)conversation:(nonnull LCIMConversation *)conversation messageDelivered:(nonnull LCIMMessage *)message;Swift
optional func conversation(_ conversation: LCIMConversation, messageDelivered message: LCIMMessage) -
Invoking when the sent message has been updated.
Declaration
Objective-C
- (void)conversation:(nonnull LCIMConversation *)conversation messageHasBeenUpdated:(nonnull LCIMMessage *)message reason:(LCIMMessagePatchedReason *_Nullable)reason;Swift
optional func conversation(_ conversation: LCIMConversation, messageHasBeenUpdated message: LCIMMessage, reason: LCIMMessagePatchedReason?)Parameters
conversationThe conversation which the sent message belongs to.
messageThe updated message.
reasonThe reason when the message was forced to be modified by the server.
-
Invoking when the sent message has been recalled.
Declaration
Objective-C
- (void)conversation:(nonnull LCIMConversation *)conversation messageHasBeenRecalled:(nonnull LCIMRecalledMessage *)message reason:(LCIMMessagePatchedReason *_Nullable)reason;Swift
optional func conversation(_ conversation: LCIMConversation, messageHasBeenRecalled message: LCIMRecalledMessage, reason: LCIMMessagePatchedReason?)Parameters
conversationThe conversation which the sent message belongs to.
messageThe recalled message.
reasonThe reason when the message was forced to be modified by the server.
-
Undocumented
Declaration
Objective-C
- (void)conversation:(nonnull LCIMConversation *)conversation membersAdded:(NSArray<NSString *> *_Nullable)clientIds byClientId:(NSString *_Nullable)clientId;Swift
optional func conversation(_ conversation: LCIMConversation, membersAdded clientIds: [String]?, byClientId clientId: String?) -
Undocumented
Declaration
Objective-C
- (void)conversation:(nonnull LCIMConversation *)conversation membersRemoved:(NSArray<NSString *> *_Nullable)clientIds byClientId:(NSString *_Nullable)clientId;Swift
optional func conversation(_ conversation: LCIMConversation, membersRemoved clientIds: [String]?, byClientId clientId: String?) -
Undocumented
Declaration
Objective-C
- (void)conversation:(nonnull LCIMConversation *)conversation invitedByClientId:(NSString *_Nullable)clientId;Swift
optional func conversation(_ conversation: LCIMConversation, invitedByClientId clientId: String?) -
Undocumented
Declaration
Objective-C
- (void)conversation:(nonnull LCIMConversation *)conversation kickedByClientId:(NSString *_Nullable)clientId;Swift
optional func conversation(_ conversation: LCIMConversation, kickedByClientId clientId: String?) -
Undocumented
Declaration
Objective-C
- (void)conversation:(nonnull LCIMConversation *)conversation didUpdateForKey:(nonnull LCIMConversationUpdatedKey)key;Swift
optional func conversation(_ conversation: LCIMConversation, didUpdateForKey key: LCIMConversationUpdatedKey) -
Notification for conversation’s attribution updated.
Declaration
Objective-C
- (void)conversation:(nonnull LCIMConversation *)conversation didUpdateAt:(NSDate *_Nullable)date byClientId:(NSString *_Nullable)clientId updatedData:(NSDictionary *_Nullable)updatedData updatingData:(NSDictionary *_Nullable)updatingData;Swift
optional func conversation(_ conversation: LCIMConversation, didUpdateAt date: Date?, byClientId clientId: String?, updatedData: [AnyHashable : Any]?, updatingData: [AnyHashable : Any]?)Parameters
conversationUpdated conversation.
dateUpdated date.
clientIdClient ID which do this update.
updatedDataUpdated data.
updatingDataUpdating data.
-
Notification for conversation’s member info updated.
Declaration
Objective-C
- (void)conversation:(nonnull LCIMConversation *)conversation didMemberInfoUpdateBy:(NSString *_Nullable)byClientId memberId:(NSString *_Nullable)memberId role:(LCIMConversationMemberRole)role;Swift
optional func conversation(_ conversation: LCIMConversation, didMemberInfoUpdateBy byClientId: String?, memberId: String?, role: LCIMConversationMemberRole)Parameters
conversationUpdated conversation.
byClientIdClient ID of doing update.
memberIdClient ID of being updated.
roleUpdated role.
-
Notification for this client was blocked by other client in the conversation.
Declaration
Objective-C
- (void)conversation:(nonnull LCIMConversation *)conversation didBlockBy:(NSString *_Nullable)byClientId;Swift
optional func conversation(_ conversation: LCIMConversation, didBlockBy byClientId: String?)Parameters
conversationConversation.
byClientIdWho blocking this client.
-
Notification for this client was Unblocked by other client in the conversation.
Declaration
Objective-C
- (void)conversation:(nonnull LCIMConversation *)conversation didUnblockBy:(NSString *_Nullable)byClientId;Swift
optional func conversation(_ conversation: LCIMConversation, didUnblockBy byClientId: String?)Parameters
conversationConversation.
byClientIdWho unblocking this client.
-
Notification for some other clients was blocked by a client in the conversation.
Declaration
Objective-C
- (void)conversation:(nonnull LCIMConversation *)conversation didMembersBlockBy:(NSString *_Nullable)byClientId memberIds:(NSArray<NSString *> *_Nullable)memberIds;Swift
optional func conversation(_ conversation: LCIMConversation, didMembersBlockBy byClientId: String?, memberIds: [String]?)Parameters
conversationConversation.
byClientIdWho blocking these clients.
memberIdsBeing blocked clients’s ID array.
-
Notification for some other clients was unblocked by a client in the conversation.
Declaration
Objective-C
- (void)conversation:(nonnull LCIMConversation *)conversation didMembersUnblockBy:(NSString *_Nullable)byClientId memberIds:(NSArray<NSString *> *_Nullable)memberIds;Swift
optional func conversation(_ conversation: LCIMConversation, didMembersUnblockBy byClientId: String?, memberIds: [String]?)Parameters
conversationConversation.
byClientIdWho unblocking these clients.
memberIdsBeing unblocked clients’s ID array.
-
Notification for this client was muted by other client in the conversation.
Declaration
Objective-C
- (void)conversation:(nonnull LCIMConversation *)conversation didMuteBy:(NSString *_Nullable)byClientId;Swift
optional func conversation(_ conversation: LCIMConversation, didMuteBy byClientId: String?)Parameters
conversationConversation.
byClientIdWho muting this client.
-
Notification for this client was Unmuted by other client in the conversation.
Declaration
Objective-C
- (void)conversation:(nonnull LCIMConversation *)conversation didUnmuteBy:(NSString *_Nullable)byClientId;Swift
optional func conversation(_ conversation: LCIMConversation, didUnmuteBy byClientId: String?)Parameters
conversationConversation.
byClientIdWho unmuting this client.
-
Notification for some other clients was muted by a client in the conversation.
Declaration
Objective-C
- (void)conversation:(nonnull LCIMConversation *)conversation didMembersMuteBy:(NSString *_Nullable)byClientId memberIds:(NSArray<NSString *> *_Nullable)memberIds;Swift
optional func conversation(_ conversation: LCIMConversation, didMembersMuteBy byClientId: String?, memberIds: [String]?)Parameters
conversationConversation.
byClientIdWho muted these clients.
memberIdsBeing muted clients’s ID array.
-
Notification for some other clients was unmuted by a client in the conversation.
Declaration
Objective-C
- (void)conversation:(nonnull LCIMConversation *)conversation didMembersUnmuteBy:(NSString *_Nullable)byClientId memberIds:(NSArray<NSString *> *_Nullable)memberIds;Swift
optional func conversation(_ conversation: LCIMConversation, didMembersUnmuteBy byClientId: String?, memberIds: [String]?)Parameters
conversationConversation.
byClientIdWho unmuting these clients.
memberIdsBeing unmuting clients’s ID array.
View on GitHub
Install in Dash
LCIMClientDelegate Protocol Reference