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
imClient
The client.
error
The 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
imClient
The client.
-
Client resumed, means the client recover connection successfully.
Declaration
Objective-C
- (void)imClientResumed:(nonnull LCIMClient *)imClient;
Swift
optional func imClientResumed(_ imClient: LCIMClient)
Parameters
imClient
The client.
-
Client closed and will not try recover connection automatically.
Common Scenario: * code:
4111
, reason:SESSION_CONFLICT
* code:4115
, reason:KICKED_BY_APP
Declaration
Objective-C
- (void)imClientClosed:(nonnull LCIMClient *)imClient error:(NSError *_Nullable)error;
Swift
optional func imClientClosed(_ imClient: LCIMClient, error: Error?)
Parameters
imClient
The client.
error
The 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
conversation
The conversation which the sent message belongs to.
message
The updated message.
reason
The 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
conversation
The conversation which the sent message belongs to.
message
The recalled message.
reason
The 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
conversation
Updated conversation.
date
Updated date.
clientId
Client ID which do this update.
updatedData
Updated data.
updatingData
Updating 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
conversation
Updated conversation.
byClientId
Client ID of doing update.
memberId
Client ID of being updated.
role
Updated 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
conversation
Conversation.
byClientId
Who 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
conversation
Conversation.
byClientId
Who 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
conversation
Conversation.
byClientId
Who blocking these clients.
memberIds
Being 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
conversation
Conversation.
byClientId
Who unblocking these clients.
memberIds
Being 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
conversation
Conversation.
byClientId
Who 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
conversation
Conversation.
byClientId
Who 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
conversation
Conversation.
byClientId
Who muted these clients.
memberIds
Being 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
conversation
Conversation.
byClientId
Who unmuting these clients.
memberIds
Being unmuting clients’s ID array.