BIMImage
@interface BIMImage : NSObject
objectivec

图片信息。

成员变量
类型名称
intwidth
intheight
NSString*url
变量说明

width
@property (nonatomic, assign, readonly) int width;
objectivec

图片宽。

height
@property (nonatomic, assign, readonly) int height;
objectivec

图片高。

url
@property (nonatomic, copy, readonly) NSString *url;
objectivec

图片URL。

BIMBaseElement
@interface BIMBaseElement : NSObject
objectivec

消息内容 Element 的基类。
通过 BIMMessage 中的 *element 获取,并根据 msgType 获取的消息类型,强转为以下具体类型使用。

BIMTextElement
@interface BIMTextElement : BIMBaseElement
objectivec

文本 Element。

成员变量
类型名称
NSString*text
变量说明

text
@property (nonatomic, copy) NSString *text;
objectivec

消息文本。

BIMAudioElement
@interface BIMAudioElement : BIMBaseElement
objectivec

语音 Element。

成员变量
类型名称
intduration
NSString*url
NSString*localPath
intprogress
BOOLisExpired
longfileSize
变量说明

duration
@property (nonatomic, assign, readonly) int duration;
objectivec

录音时长(单位 秒)。

url
@property (nonatomic, copy, readonly) NSString *url;
objectivec

文件远端 URL。

localPath
@property (nonatomic, copy, readonly) NSString *localPath;
objectivec

文件本地路径(可能为 null )

progress
@property (nonatomic, assign, readonly) int progress;
objectivec

上传进度(0~100)。

isExpired
@property (nonatomic, assign, readonly) BOOL isExpired;
objectivec

文件是否过期。

fileSize
@property (nonatomic, assign, readonly) long long fileSize;
objectivec

文件大小(单位: B)。

BIMImageElement
@interface BIMImageElement : BIMBaseElement
objectivec

图片 Element。

成员变量
类型名称
BIMImage*thumbImg
BIMImage*largeImg
BIMImage*originImg
NSString*localPath
intprogress
BOOLisExpired
longfileSize
变量说明

thumbImg
@property (nonatomic, strong, readonly) BIMImage *thumbImg;
objectivec

缩略图信息,参看 BIMImage。

largeImg
@property (nonatomic, strong, readonly) BIMImage *largeImg;
objectivec

大图(预览图)信息,参看 BIMImage。

originImg
@property (nonatomic, strong, readonly) BIMImage *originImg;
objectivec

原图信息,参看 BIMImage。

localPath
@property (nonatomic, copy, readonly) NSString *localPath;
objectivec

文件本地路径(可能为 null )

progress
@property (nonatomic, assign, readonly) int progress;
objectivec

上传进度(0~100)。

isExpired
@property (nonatomic, assign, readonly) BOOL isExpired;
objectivec

文件是否过期。

fileSize
@property (nonatomic, assign, readonly) long long fileSize;
objectivec

文件大小(单位: B)。

BIMVideoElement
@interface BIMVideoElement : BIMBaseElement
objectivec

视频 Element。

成员变量
类型名称
NSString*url
BIMImage*coverImg
NSString*localPath
intprogress
BOOLisExpired
longfileSize
变量说明

url
@property (nonatomic, copy, readonly) NSString *url;
objectivec

文件远端 URL。

coverImg
@property (nonatomic, strong, readonly) BIMImage *coverImg;
objectivec

视频封面图(视频首帧)。

localPath
@property (nonatomic, copy, readonly) NSString *localPath;
objectivec

文件本地路径(可能为 null )

progress
@property (nonatomic, assign, readonly) int progress;
objectivec

上传进度(0~100)。

isExpired
@property (nonatomic, assign, readonly) BOOL isExpired;
objectivec

文件是否过期。

fileSize
@property (nonatomic, assign, readonly) long long fileSize;
objectivec

文件大小(单位: B)。

BIMFileElement
@interface BIMFileElement : BIMBaseElement
objectivec

文件 Element。

成员变量
类型名称
NSString*fileName
NSString*url
NSString*localPath
intprogress
BOOLisExpired
longfileSize
变量说明

fileName
@property (nonatomic, copy, readonly) NSString *fileName;
objectivec

文件名称。

url
@property (nonatomic, copy, readonly) NSString *url;
objectivec

文件远端 URL。

localPath
@property (nonatomic, copy, readonly) NSString *localPath;
objectivec

文件本地路径(可能为 null )。

progress
@property (nonatomic, assign, readonly) int progress;
objectivec

上传进度(0~100)。

isExpired
@property (nonatomic, assign, readonly) BOOL isExpired;
objectivec

文件是否过期。

fileSize
@property (nonatomic, assign, readonly) long long fileSize;
objectivec

文件大小(单位: B)。

BIMCustomElement
@interface BIMCustomElement : BIMBaseElement
objectivec

自定义 Element。

成员变量
类型名称
NSDictionary*dataDict
变量说明

dataDict
@property (nonatomic, copy, readonly) NSDictionary *dataDict;
objectivec

属性的 key 值。

BIMFriendStatus
typedef NS_ENUM(NSInteger, BIMFriendStatus)
objectivec

好友状态

枚举值
类型值说明
BIM_FRIEND_STATUS_APPLY0申请状态
BIM_FRIEND_STATUS_AGREE1同意状态
BIM_FRIEND_STATUS_REFUSE2拒绝状态
BIMFriendReplyType
typedef NS_ENUM(NSInteger, BIMFriendReplyType)
objectivec

好友申请回应状态。

枚举值
类型值说明
BIM_FRIEND_REPLY_AGREE0接受好友申请。
BIM_FRIEND_REPLY_REFUSE1拒绝好友申请。
BIMBlackListFriendInfo
@interface BIMBlackListFriendInfo : NSObject
objectivec

黑名单用户信息。

成员变量
类型名称
longuid
longcreateTime
longmodifyTime
NSString*alias
NSDictionary*ext
变量说明

uid
@property (nonatomic, assign) long long uid;
objectivec

黑名单用户ID。

createTime
@property (nonatomic, assign) long long createTime;
objectivec

用户拉黑时间。

modifyTime
@property (nonatomic, assign) long long modifyTime;
objectivec

黑名单信息更新时间。

alias
@property (nonatomic, copy) NSString *alias;
objectivec

黑名单用户备注名

ext
@property (nonatomic, copy) NSDictionary *ext;
objectivec

黑名单额外信息。

BIMFriendApplyInfo
@interface BIMFriendApplyInfo : NSObject
objectivec

好友申请信息。

成员变量
类型名称
longfromUid
longtoUid
longapplyTime
longanswerTime
BIMFriendStatusstatus
BOOLisSelf
NSDictionary*ext
变量说明

fromUid
@property (nonatomic, assign) long long fromUid;
objectivec

申请人 uid。

toUid
@property (nonatomic, assign) long long toUid;
objectivec

申请对象 uid。

applyTime
@property (nonatomic, assign) long long applyTime;
objectivec

申请时间。

answerTime
@property (nonatomic, assign) long long answerTime;
objectivec

应答时间。

status
@property (nonatomic, assign) BIMFriendStatus status;
objectivec

申请状态,参看 BIMFriendStatus。

isSelf
@property (nonatomic, assign) BOOL isSelf;
objectivec

是否自己发送的申请。

ext
@property (nonatomic, copy) NSDictionary *ext;
objectivec

额外信息。

BIMFriendInfo
@interface BIMFriendInfo : NSObject
objectivec

好友信息。

成员变量
类型名称
longuid
longagreeTime
NSString*alias
longmodifyTime
NSDictionary*ext
变量说明

uid
@property (nonatomic, assign) long long uid;
objectivec

用户 ID。

agreeTime
@property (nonatomic, assign) long long agreeTime;
objectivec

成为好友时间。

alias
@property (nonatomic, copy) NSString *alias;
objectivec

好友备注

modifyTime
@property (nonatomic, assign) long long modifyTime;
objectivec

修改时间

ext
@property (nonatomic, copy) NSDictionary *ext;
objectivec

额外信息。

BIMApplyInfo
@interface BIMApplyInfo : NSObject
objectivec

好友申请信息。

成员变量
类型名称
longuid
NSDictionary*ext
变量说明

uid
@property (nonatomic, assign) long long uid;
objectivec

用户 ID。

ext
@property (nonatomic, copy) NSDictionary *ext;
objectivec

额外信息。

BIMReplyInfo
@interface BIMReplyInfo : NSObject
objectivec

好友申请回应信息。

成员变量
类型名称
longuid
BIMFriendReplyTypereplyType
NSDictionary*ext
变量说明

uid
@property (nonatomic, assign) long long uid;
objectivec

用户 ID。

replyType
@property (nonatomic, assign) BIMFriendReplyType replyType;
objectivec

回复状态,参看 BIMFriendReplyType。

ext
@property (nonatomic, copy) NSDictionary *ext;
objectivec

额外信息。

BIMMessagePriority
typedef NS_ENUM(NSUInteger, BIMMessagePriority)
objectivec

优先级

枚举值
类型值说明
BIMMessagePriorityLow0低优先级
BIMMessagePriorityNormal1普通优先级
BIMMessagePriorityHigh2高优先级
BIMGroupInfo
@interface BIMGroupInfo : NSObject
objectivec

直播群信息。

成员变量
类型名称
NSString*name
NSString*avatarURL
NSString*desc
NSString*notice
变量说明

name
@property(nonatomic, copy) NSString *name;
objectivec

直播群名称。

avatarURL
@property(nonatomic, copy) NSString *avatarURL;
objectivec

直播群头像 url。

desc
@property(nonatomic, copy) NSString *desc;
objectivec

直播群描述。

notice
@property(nonatomic, copy) NSString *notice;
objectivec

直播群公告。

BIMMemberUpdateInfo
@interface BIMMemberUpdateInfo : NSObject
objectivec

直播群成员资料更新信息

成员变量
类型名称
NSString*alias
NSString*avatarUrl
NSDictionary*ext
变量说明

alias
@property (nonatomic, copy) NSString *alias;
objectivec

直播群用户备注。

avatarUrl
@property (nonatomic, copy) NSString *avatarUrl;
objectivec

直播群用户头像URL。

ext
@property (nonatomic, copy) NSDictionary *ext;
objectivec

直播群用户额外信息。

BIMConversationType
typedef NS_ENUM(NSInteger, BIMConversationType)
objectivec

会话类型。

枚举值
类型值说明
BIM_CONVERSATION_TYPE_ONE_CHAT1单聊。无论创建次数,和同一个人的单聊 ID 保持不变。
BIM_CONVERSATION_TYPE_GROUP_CHAT2群聊。
BIM_CONVERSATION_TYPE_LIVE_GROUP100直播群。
BIMConversationStatus
typedef NS_ENUM(NSInteger, BIMConversationStatus)
objectivec

会话状态。

枚举值
类型值说明
BIMConversationStatusNormal0正常。
BIMConversationStatusDissolved1会话被解散。
BIMBlockStatus
typedef NS_ENUM(NSInteger, BIMBlockStatus)
objectivec

禁言状态码

枚举值
类型值说明
BIM_BLOCK_STATUS_UNBLOCK0未禁言状态
BIM_BLOCK_STATUS_BLOCK1禁言状态
BIMMember
@protocol BIMMember <NSObject>
objectivec

群成员信息。

成员变量
类型名称
longuserID
NSString*conversationID
longsortOrder
BIMMemberRolerole
NSString*alias
BOOLisOnline
NSString*avatarURL
NSDictionary*ext
变量说明

userID
@property (nonatomic, assign, readonly) long long userID;
objectivec

获取群成员 userID。

conversationID
@property (nonatomic, copy, readonly) NSString *conversationID;
objectivec

所属会话 ID。

sortOrder
@property (nonatomic, assign, readonly) long long sortOrder;
objectivec

服务器排序。服务器以加入时间为排序依据,业务方可自行根据其他字段再次排序。

role
@property (nonatomic, assign, readonly) BIMMemberRole role;
objectivec

获取群成员角色。

alias
@property (nonatomic, copy, nullable, readonly) NSString *alias;
objectivec

获取群成员别名。

isOnline
@property (nonatomic, assign, readonly) BOOL isOnline;
objectivec

在线状态。

avatarURL
@property (nonatomic, copy, readonly) NSString *avatarURL;
objectivec

用户在会话中的头像(仅直播群使用)

ext
@property (nonatomic, copy, readonly) NSDictionary *ext;
objectivec

用户在会话中的额外信息

BIMConversation
@interface BIMConversation : NSObject
objectivec

会话信息。

成员变量
类型名称
NSNumber*conversationShortID
BIMConversationTypeconversationType
BOOLisDissolved
BOOLisMember
NSUIntegerunreadCount
BOOLisStickTop
NSUIntegermemberCount
NSDate*updatedTime
NSString*draftText
NSDate*draftTime
BIMMessage*lastMessage
longsortOrder
NSString*conversationID
BOOLisMute
longoppositeUserID
NSString*name
NSString*notice
NSString*introduction
NSString*portraitURL
idcurrentMember
NSIntegeronlineMemberCount
BIMBlockStatusblockStatus
longownerID
变量说明

conversationShortID
@property (nonatomic, strong, nullable, readonly) NSNumber *conversationShortID;
objectivec

会话和服务器交互时所需要的 shortID。int64 类型,取值时请使用 longLongValue 防止截断。在会话没有成功创建前,该值为 nil。

conversationType
@property (nonatomic, assign, readonly) BIMConversationType conversationType;
objectivec

会话类型,参看 BIMConversationType。

isDissolved
@property (nonatomic, assign, readonly) BOOL isDissolved;
objectivec

会话是否解散, 解散返回 true, 反之返回 false。

isMember
@property (nonatomic, assign, readonly) BOOL isMember;
objectivec

当前用户是否是会话成员, 当前用户在会话返回 true, 被踢出、主动退出等情况返回 false。

unreadCount
@property (nonatomic, assign, readonly) NSUInteger unreadCount;
objectivec

会话未读数。

isStickTop
@property (nonatomic, assign, readonly) BOOL isStickTop;
objectivec

会话是否置顶, 置顶则返回 true, 反之返回 false。

memberCount
@property (nonatomic, assign, readonly) NSUInteger memberCount;
objectivec

会话成员个数。

updatedTime
@property (nonatomic, strong, nullable, readonly) NSDate *updatedTime;
objectivec

会话最后更新日期。

draftText
@property (nonatomic, strong, nullable, readonly) NSString *draftText;
objectivec

会话草稿内容。

draftTime
@property (nonatomic, strong, nullable, readonly) NSDate *draftTime;
objectivec

草稿更新时间。

lastMessage
@property (nonatomic, strong, nullable, readonly) BIMMessage *lastMessage;
objectivec

会话最后一条消息,参看 BIMMessage。

sortOrder
@property (nonatomic, assign, readonly) long long sortOrder;
objectivec

会话排序 sortOrder。

conversationID
@property (nonatomic, strong, readonly) NSString *conversationID;
objectivec

会话 ID。

isMute
@property (nonatomic, assign, readonly) BOOL isMute;
objectivec

会话是否是否免打扰。

oppositeUserID
@property (nonatomic, assign, readonly) long long oppositeUserID;
objectivec

单聊对方uid。

name
@property (nonatomic, strong, nullable, readonly) NSString *name;
objectivec

会话名称。

notice
@property (nonatomic, strong, nullable, readonly) NSString *notice;
objectivec

会话公告。

introduction
@property (nonatomic, strong, nullable, readonly) NSString *introduction;
objectivec

会话简介。

portraitURL
@property (nonatomic, strong, nullable, readonly) NSString *portraitURL;
objectivec

会话图标。

currentMember
@property (nonatomic, strong, nullable, readonly) id<BIMMember> currentMember;
objectivec

当前用户在会话中的信息,参看 BIMMember。

onlineMemberCount
@property (nonatomic, assign, readonly) NSInteger onlineMemberCount;
objectivec

直播群在线人数

blockStatus
@property (nonatomic, assign, readonly) BIMBlockStatus blockStatus;
objectivec

群禁言状态,参看 BIMBlockStatus.

ownerID
@property (atomic, assign, readonly) long long ownerID;
objectivec

会话群主 ID

BIMConnectStauts
typedef NS_ENUM(NSUInteger, BIMConnectStauts)
objectivec

长链状态码。

枚举值
类型值说明
BIM_CONNECT_STATUS_CONNECTING1连接中
BIM_CONNECT_STATUS_FAILED2连接失败
BIM_CONNECT_STATUS_CLOSED3连接关闭
BIM_CONNECT_STATUS_CONNECTED4连接成功
BIMMemberRole
typedef NS_ENUM(NSInteger, BIMMemberRole)
objectivec

群组角色。

枚举值
类型值说明
BIM_MEMBER_ROLE_NORMAL0普通成员。
BIM_MEMBER_ROLE_OWNER1群主。
BIM_MEMBER_ROLE_ADMIN2管理员。
BIM_MEMBER_ROLE_VISITOR3游客。
BIMError
@interface BIMError : NSObject
objectivec

BIMError Class

成员变量
类型名称
BIMErrorCodecode
NSString*localizedDescription
变量说明

code
@property (nonatomic, assign, readonly) BIMErrorCode code;
objectivec

错误码,参看 BIMErrorCode。

localizedDescription
@property (nonatomic, copy, readonly) NSString *localizedDescription;
objectivec

错误描述。

BIMGetMessageOption
@interface BIMGetMessageOption : NSObject
objectivec

获取消息选项。

成员变量
类型名称
NSUIntegerlimit
BIMMessage*anchorMessage
变量说明

limit
@property(nonatomic, assign) NSUInteger limit;
objectivec

获取消息数量。

anchorMessage
@property (nonatomic, strong) BIMMessage *anchorMessage;
objectivec

获取拉消息起点。

earliestMessage
@property (nonatomic, strong) BIMMessage *earliestMessage;
objectivec

Deprecated since v1.3.0, use anchorMessage instead.

获取拉消息起点。

BIMLiveMemberOnlineInfo
@interface BIMLiveMemberOnlineInfo : NSObject
objectivec

直播群在线信息。

成员变量
类型名称
longconversationId
longuserID
BOOLisInGroup
longjoinTime
longlastPingTime
变量说明

conversationId
@property (nonatomic, assign) long long conversationId;
objectivec

获取会话 shortID。

userID
@property (nonatomic, assign) long long userID;
objectivec

获取用户 ID。

isInGroup
@property (nonatomic, assign) BOOL isInGroup;
objectivec

当前是否在直播群 (在线)。

joinTime
@property (nonatomic, assign) long long joinTime;
objectivec

入群时间 (单位:ms)。

lastPingTime
@property (nonatomic, assign) long long lastPingTime;
objectivec

最后一次 ping 成功时间(单位:ms)。

BIMMessageStatus
typedef NS_ENUM(NSInteger, BIMMessageStatus)
objectivec

消息状态。

枚举值
类型值说明
BIM_MESSAGE_STATUS_PENDING0消息已插入数据库,正等待发送。
BIM_MESSAGE_STATUS_SENDING1正在发送消息的消息体及同步的拓展信息。
BIM_MESSAGE_STATUS_SUCCESS2消息已成功发送。
BIM_MESSAGE_STATUS_FAILED3消息发送失败。
BIM_MESSAGE_STATUS_NORMAL5消息已被接收。
BIMMessageType
typedef NS_ENUM(NSInteger, BIMMessageType)
objectivec

消息类型。

枚举值
类型值说明
BIM_MESSAGE_TYPE_TEXT10001文本消息。
BIM_MESSAGE_TYPE_IMAGE10003图片消息。
BIM_MESSAGE_TYPE_VIDEO10004视频消息。
BIM_MESSAGE_TYPE_FILE10005文件消息。
BIM_MESSAGE_TYPE_AUDIO10006音频消息。
BIM_MESSAGE_TYPE_CUSTOM10012自定义消息。
BIMReferenceInfo
@interface BIMReferenceInfo : NSObject
objectivec

引用消息信息。

成员变量
类型名称
int64_tserverMessageID
BIMMessageTypemessageType
NSString*hint
NSIntegerstatus
变量说明

serverMessageID
@property (nonatomic, assign) int64_t serverMessageID;
objectivec

服务端消息 ID。

messageType
@property (nonatomic, assign) BIMMessageType messageType;
objectivec

消息类型。

hint
@property (nonatomic, copy) NSString *hint;
objectivec

业务透传的引用消息。

status
@property (nonatomic, assign) NSInteger status;
objectivec

消息状态。

BIMMessage
@interface BIMMessage : NSObject
objectivec

消息体。

成员变量
类型名称
BIMBaseElement*element
NSDate*createdTime
longorderIndex
BIMMessageTypemsgType
BIMReferenceInfo*referenceInfo
longsenderUID
NSString*uuid
NSString*conversationID
BOOLisRecalled
BIMMessageStatusmsgStatus
NSNumber*serverMessageID
NSArray<NSNumber>**mentionUIDList
NSDictionary*ext
变量说明

element
@property (nonatomic, strong, readonly) BIMBaseElement *element;
objectivec

获取消息 Element 数据,参看 BIMBaseElement。

createdTime
@property (nonatomic, strong, nullable, readonly) NSDate *createdTime;
objectivec

消息创建时间。

orderIndex
@property (nonatomic, assign, readonly) long long orderIndex;
objectivec

消息排序 index。

msgType
@property (nonatomic, assign, readonly) BIMMessageType msgType;
objectivec

消息类型,参看 BIMMessageType。

referenceInfo
@property (nonatomic, strong, readonly) BIMReferenceInfo *referenceInfo;
objectivec

引用消息,参看 BIMReferenceInfo。

senderUID
@property (nonatomic, assign, readonly) long long senderUID;
objectivec

消息发送者userID。

uuid
@property (nonatomic, strong, readonly) NSString *uuid;
objectivec

消息客户端 ID。

conversationID
@property (nonatomic, strong, readonly) NSString *conversationID;
objectivec

消息所属的会话 ID。

isRecalled
@property (nonatomic, assign, readonly) BOOL isRecalled;
objectivec

该消息是否被撤回

msgStatus
@property (nonatomic, assign, readonly) BIMMessageStatus msgStatus;
objectivec

当前消息状态,参看 BIMMessageStatus。

serverMessageID
@property (nonatomic, strong, nullable, readonly) NSNumber *serverMessageID;
objectivec

消息和服务器交互时所需要的 ID,int64 类型,取值时请使用 longLongValue 防止截断。在消息没有被服务器再次分发到本地前,该值为 nil。

mentionUIDList
@property (nonatomic, strong, readonly) NSArray<NSNumber *> *mentionUIDList;
objectivec

消息 at 用户列表,所有人用 0 表示。

ext
@property (nonatomic, copy) NSDictionary *ext;
objectivec

同步的拓展信息, 该拓展信息跟随消息一并发送,所有接受者能够获取到里面的值。

BIMLogLevel
typedef NS_ENUM(NSInteger, BIMLogLevel)
objectivec

输出的日志级别。

枚举值
类型值说明
BIM_LOG_DEBUG1debug。
BIM_LOG_INFO2info。
BIM_LOG_WARN3warn。
BIM_LOG_ERROR4error。
BIMSDKConfig
@interface BIMSDKConfig : NSObject
objectivec

SDK 初始化配置信息。

成员变量
类型名称
BIMLogListenerlogListener
变量说明

logListener
@property(nonatomic, copy) BIMLogListener logListener;
objectivec

设置日志监听。

BIMSearchDetail
@interface BIMSearchDetail : NSObject
objectivec

搜索详情

成员变量
类型名称
NSString*searchContent
NSArray<NSValue>**keyPositions
NSString*searchKey
变量说明

searchContent
@property (nonatomic, copy) NSString *searchContent;
objectivec

消息搜索内容。

keyPositions
@property (nonatomic, copy) NSArray<NSValue *> *keyPositions;
objectivec

搜索关键词在 searchContent 位置(NSRange)。

searchKey
@property (nonatomic, copy) NSString *searchKey;
objectivec

搜索关键词。

BIMSearchMsgInfo
@interface BIMSearchMsgInfo : NSObject
objectivec

消息搜索结果

成员变量
类型名称
BIMMessage*message
BIMSearchDetail*searchDetail
变量说明

message
@property (nonatomic, strong) BIMMessage *message;
objectivec

搜索到的消息。

searchDetail
@property (nonatomic, strong) BIMSearchDetail *searchDetail;
objectivec

消息搜索详情.