HyphenateChatSDK 4.5.0
构造函数 | 所有成员列表
<EMClientDelegate>协议 参考

#import <EMClientDelegate.h>

类 <EMClientDelegate> 继承关系图:

构造函数

(void) - connectionStateDidChange:
 
(void) - autoLoginDidCompleteWithError:
 
(void) - userAccountDidLoginFromOtherDevice:
 
(void) - userAccountDidRemoveFromServer
 
(void) - userDidForbidByServer
 
(void) - userAccountDidForcedToLogout:
 
(void) - tokenWillExpire:
 
(void) - tokenDidExpire:
 
(3_1_0, 4_1_0, "Use userAccountDidLoginFromOtherDevice: instead") - EM_DEPRECATED_IOS
 

详细描述

@abstract EMClientDelegate 提供与账号登录状态相关的回调。

函数文档

◆ autoLoginDidCompleteWithError:

- (void) autoLoginDidCompleteWithError: (EMError *_Nullable)  aError
optional

自动登录完成时的回调。

参数
aError错误信息,包含失败原因。

◆ connectionStateDidChange:

- (void) connectionStateDidChange: (EMConnectionState)  aConnectionState
optional

SDK 连接服务器的状态变化时会接收到该回调。

SDK 会在以下情况下触发该回调: 1.登录成功后,设备无法上网时。 2.登录成功后,连接状态发生变化时。

参数
aConnectionState当前的连接状态。

◆ EM_DEPRECATED_IOS

- (3_1_0, 4_1_0, "Use) userAccountDidLoginFromOtherDevice:
optional

当前登录账号在其它设备登录时会接收到此回调。

◆ tokenDidExpire:

- (void) tokenDidExpire: (EMErrorCode)  aErrorCode
optional

token已经过期

◆ tokenWillExpire:

- (void) tokenWillExpire: (EMErrorCode)  aErrorCode
optional

token 即将过期

◆ userAccountDidForcedToLogout:

- (void) userAccountDidForcedToLogout: (EMError *_Nullable)  aError
optional

当前登录账号被强制退出时会收到该回调,有以下原因:

  • 密码被修改;
  • 登录设备数过多;
  • 服务被封禁;
  • 被强制下线;

◆ userAccountDidLoginFromOtherDevice:

- (void) userAccountDidLoginFromOtherDevice: (NSString *_Nullable)  aDeviceName
optional

当前登录账号在其它设备登录时会接收到此回调。

参数
aDeviceName登录设备的设备名称。

◆ userAccountDidRemoveFromServer

- (void) userAccountDidRemoveFromServer
optional

当前登录账号已经被从服务器端删除时会收到该回调。

◆ userDidForbidByServer

- (void) userDidForbidByServer
optional

当前用户账号被禁用时会收到该回调。


该协议的文档由以下文件生成: