@interface BIMImage : NSObject
objectivec图片信息。
| 类型 | 名称 |
|---|---|
| int | width |
| int | height |
| NSString* | url |
@property (nonatomic, assign, readonly) int width;
objectivec图片宽。
@property (nonatomic, assign, readonly) int height;
objectivec图片高。
@property (nonatomic, copy, readonly) NSString *url;
objectivec图片URL。
@interface BIMBaseElement : NSObject
objectivec消息内容 Element 的基类。
通过 BIMMessage 中的 `
@interface BIMTextElement : BIMBaseElement
objectivec文本 Element。
| 类型 | 名称 |
|---|---|
| NSString* | text |
@property (nonatomic, copy) NSString *text;
objectivec消息文本。
@interface BIMAudioElement : BIMBaseElement
objectivec语音 Element。
| 类型 | 名称 |
|---|---|
| int | duration |
| NSString* | url |
| NSString* | localPath |
| int | progress |
| BOOL | isExpired |
| long | fileSize |
@property (nonatomic, assign, readonly) int duration;
objectivec录音时长(单位 秒)。
@property (nonatomic, copy, readonly) NSString *url;
objectivec文件远端 URL。
@property (nonatomic, copy, readonly) NSString *localPath;
objectivec文件本地路径(可能为 null )
@property (nonatomic, assign, readonly) int progress;
objectivec上传进度(0~100)。
@property (nonatomic, assign, readonly) BOOL isExpired;
objectivec文件是否过期。
@property (nonatomic, assign, readonly) long long fileSize;
objectivec文件大小(单位: B)。
@interface BIMImageElement : BIMBaseElement
objectivec图片 Element。
| 类型 | 名称 |
|---|---|
| BIMImage* | thumbImg |
| BIMImage* | largeImg |
| BIMImage* | originImg |
| NSString* | localPath |
| int | progress |
| BOOL | isExpired |
| long | fileSize |
@property (nonatomic, strong, readonly) BIMImage *thumbImg;
objectivec缩略图信息,参看 BIMImage。
@property (nonatomic, strong, readonly) BIMImage *largeImg;
objectivec大图(预览图)信息,参看 BIMImage。
@property (nonatomic, strong, readonly) BIMImage *originImg;
objectivec原图信息,参看 BIMImage。
@property (nonatomic, copy, readonly) NSString *localPath;
objectivec文件本地路径(可能为 null )
@property (nonatomic, assign, readonly) int progress;
objectivec上传进度(0~100)。
@property (nonatomic, assign, readonly) BOOL isExpired;
objectivec文件是否过期。
@property (nonatomic, assign, readonly) long long fileSize;
objectivec文件大小(单位: B)。
@interface BIMVideoElement : BIMBaseElement
objectivec视频 Element。
| 类型 | 名称 |
|---|---|
| NSString* | url |
| BIMImage* | coverImg |
| NSString* | localPath |
| int | progress |
| BOOL | isExpired |
| long | fileSize |
@property (nonatomic, copy, readonly) NSString *url;
objectivec文件远端 URL。
@property (nonatomic, strong, readonly) BIMImage *coverImg;
objectivec视频封面图(视频首帧)。
@property (nonatomic, copy, readonly) NSString *localPath;
objectivec文件本地路径(可能为 null )
@property (nonatomic, assign, readonly) int progress;
objectivec上传进度(0~100)。
@property (nonatomic, assign, readonly) BOOL isExpired;
objectivec文件是否过期。
@property (nonatomic, assign, readonly) long long fileSize;
objectivec文件大小(单位: B)。
@interface BIMFileElement : BIMBaseElement
objectivec文件 Element。
| 类型 | 名称 |
|---|---|
| NSString* | fileName |
| NSString* | url |
| NSString* | localPath |
| int | progress |
| BOOL | isExpired |
| long | fileSize |
@property (nonatomic, copy, readonly) NSString *fileName;
objectivec文件名称。
@property (nonatomic, copy, readonly) NSString *url;
objectivec文件远端 URL。
@property (nonatomic, copy, readonly) NSString *localPath;
objectivec文件本地路径(可能为 null )。
@property (nonatomic, assign, readonly) int progress;
objectivec上传进度(0~100)。
@property (nonatomic, assign, readonly) BOOL isExpired;
objectivec文件是否过期。
@property (nonatomic, assign, readonly) long long fileSize;
objectivec文件大小(单位: B)。
@interface BIMCustomElement : BIMBaseElement
objectivec自定义 Element。
| 类型 | 名称 |
|---|---|
| NSDictionary* | dataDict |
@property (nonatomic, copy, readonly) NSDictionary *dataDict;
objectivec属性的 key 值。
typedef NS_ENUM(NSUInteger, BIMMessagePriority)
objectivec优先级
| 类型 | 值 | 说明 |
|---|---|---|
| BIMMessagePriorityLow | 0 | 低优先级 |
| BIMMessagePriorityNormal | 1 | 普通优先级 |
| BIMMessagePriorityHigh | 2 | 高优先级 |
@interface BIMGroupInfo : NSObject
objectivec直播群信息。
| 类型 | 名称 |
|---|---|
| NSString* | name |
| NSString* | avatarURL |
| NSString* | desc |
| NSString* | notice |
@property(nonatomic, copy) NSString *name;
objectivec直播群名称。
@property(nonatomic, copy) NSString *avatarURL;
objectivec直播群头像 url。
@property(nonatomic, copy) NSString *desc;
objectivec直播群描述。
@property(nonatomic, copy) NSString *notice;
objectivec直播群公告。
typedef NS_ENUM(NSInteger, BIMConversationType)
objectivec会话类型。
| 类型 | 值 | 说明 |
|---|---|---|
| BIM_CONVERSATION_TYPE_UNKNOWN | -1 | 未知会话。 |
| BIM_CONVERSATION_TYPE_ONE_CHAT | 1 | 单聊。无论创建次数,和同一个人的单聊 ID 保持不变。 |
| BIM_CONVERSATION_TYPE_GROUP_CHAT | 2 | 群聊。 |
| BIM_CONVERSATION_TYPE_LIVE_GROUP | 100 | 直播群。 |
typedef NS_ENUM(NSInteger, BIMConversationStatus)
objectivec会话状态。
| 类型 | 值 | 说明 |
|---|---|---|
| BIMConversationStatusNormal | 0 | 正常。 |
| BIMConversationStatusDissolved | 1 | 会话被解散。 |
typedef NS_ENUM(NSInteger, BIMBlockStatus)
objectivec禁言状态码
| 类型 | 值 | 说明 |
|---|---|---|
| BIM_BLOCK_STATUS_UNKNOWN | -1 | 未知状态 |
| BIM_BLOCK_STATUS_UNBLOCK | 0 | 未禁言状态 |
| BIM_BLOCK_STATUS_BLOCK | 1 | 禁言状态 |
@protocol BIMMember <NSObject>
objectivec群成员信息。
| 类型 | 名称 |
|---|---|
| long | userID |
| NSString* | conversationID |
| long | sortOrder |
| BIMMemberRole | role |
| NSString* | alias |
| BOOL | isOnline |
@property (nonatomic, assign, readonly) long long userID;
objectivec获取群成员 userID。
@property (nonatomic, strong, readonly) NSString *conversationID;
objectivec所属会话 ID。
@property (nonatomic, assign, readonly) long long sortOrder;
objectivec服务器排序。服务器以加入时间为排序依据,业务方可自行根据其他字段再次排序。
@property (nonatomic, assign, readonly) BIMMemberRole role;
objectivec获取群成员角色。
@property (nonatomic, strong, nullable, readonly) NSString *alias;
objectivec获取群成员别名。
@property (nonatomic, assign, readonly) BOOL isOnline;
objectivec在线状态。
@interface BIMConversation : NSObject
objectivec会话信息。
| 类型 | 名称 |
|---|---|
| NSNumber* | conversationShortID |
| BIMConversationType | conversationType |
| BOOL | isDissolved |
| BOOL | isMember |
| NSUInteger | unreadCount |
| BOOL | isStickTop |
| NSUInteger | memberCount |
| NSDate* | updatedTime |
| NSString* | draftText |
| NSDate* | draftTime |
| BIMMessage* | lastMessage |
| long | sortOrder |
| NSString* | conversationID |
| BOOL | isMute |
| long | oppositeUserID |
| NSString* | name |
| NSString* | notice |
| NSString* | introduction |
| NSString* | portraitURL |
| id | currentMember |
| NSInteger | onlineMemberCount |
| BIMBlockStatus | blockStatus |
| long | ownerID |
@property (nonatomic, strong, nullable, readonly) NSNumber *conversationShortID;
objectivec会话和服务器交互时所需要的 shortID。int64 类型,取值时请使用 longLongValue 防止截断。在会话没有成功创建前,该值为 nil。
@property (nonatomic, assign, readonly) BIMConversationType conversationType;
objectivec会话类型,参看 BIMConversationType。
@property (nonatomic, assign, readonly) BOOL isDissolved;
objectivec会话是否解散, 解散返回 true, 反之返回 false。
@property (nonatomic, assign, readonly) BOOL isMember;
objectivec当前用户是否是会话成员, 当前用户在会话返回 true, 被踢出、主动退出等情况返回 false。
@property (nonatomic, assign, readonly) NSUInteger unreadCount;
objectivec会话未读数。
@property (nonatomic, assign, readonly) BOOL isStickTop;
objectivec会话是否置顶, 置顶则返回 true, 反之返回 false。
@property (nonatomic, assign, readonly) NSUInteger memberCount;
objectivec会话成员个数。
@property (nonatomic, strong, nullable, readonly) NSDate *updatedTime;
objectivec会话最后更新日期。
@property (nonatomic, strong, nullable, readonly) NSString *draftText;
objectivec会话草稿内容。
@property (nonatomic, strong, nullable, readonly) NSDate *draftTime;
objectivec草稿更新时间。
@property (nonatomic, strong, nullable, readonly) BIMMessage *lastMessage;
objectivec会话最后一条消息,参看 BIMMessage。
@property (nonatomic, assign, readonly) long long sortOrder;
objectivec会话排序 sortOrder。
@property (nonatomic, strong, readonly) NSString *conversationID;
objectivec会话 ID。
@property (nonatomic, assign, readonly) BOOL isMute;
objectivec会话是否是否免打扰。
@property (nonatomic, assign, readonly) long long oppositeUserID;
objectivec单聊对方uid。
@property (nonatomic, strong, nullable, readonly) NSString *name;
objectivec会话名称。
@property (nonatomic, strong, nullable, readonly) NSString *notice;
objectivec会话公告。
@property (nonatomic, strong, nullable, readonly) NSString *introduction;
objectivec会话简介。
@property (nonatomic, strong, nullable, readonly) NSString *portraitURL;
objectivec会话图标。
@property (nonatomic, strong, nullable, readonly) id<BIMMember> currentMember;
objectivec当前用户在会话中的信息,参看 BIMMember。
@property (nonatomic, assign, readonly) NSInteger onlineMemberCount;
objectivec直播群在线人数
@property (nonatomic, assign, readonly) BIMBlockStatus blockStatus;
objectivec群禁言状态,参看 BIMBlockStatus.
@property (atomic, assign, readonly) long long ownerID;
objectivec会话群主 ID
typedef NS_ENUM(NSUInteger, BIMConnectStauts)
objectivec长链状态码。
| 类型 | 值 | 说明 |
|---|---|---|
| BIM_CONNECT_STATUS_UNKNOWN | 0 | 未知状态 |
| BIM_CONNECT_STATUS_CONNECTING | 1 | 连接中 |
| BIM_CONNECT_STATUS_FAILED | 2 | 连接失败 |
| BIM_CONNECT_STATUS_CLOSED | 3 | 连接关闭 |
| BIM_CONNECT_STATUS_CONNECTED | 4 | 连接成功 |
typedef NS_ENUM(NSInteger, BIMMemberRole)
objectivec群组角色。
| 类型 | 值 | 说明 |
|---|---|---|
| BIM_MEMBER_ROLE_UNKNOWN | -1 | 未知。 |
| BIM_MEMBER_ROLE_NORMAL | 0 | 普通成员。 |
| BIM_MEMBER_ROLE_OWNER | 1 | 群主。 |
| BIM_MEMBER_ROLE_ADMIN | 2 | 管理员。 |
| BIM_MEMBER_ROLE_VISITOR | 3 | 游客。 |
@interface BIMError : NSObject
objectivecBIMError Class
| 类型 | 名称 |
|---|---|
| BIMErrorCode | code |
| NSString* | localizedDescription |
@property (nonatomic, assign, readonly) BIMErrorCode code;
objectivec错误码,参看 BIMErrorCode。
@property (nonatomic, copy, readonly) NSString *localizedDescription;
objectivec错误描述。
@interface BIMGetMessageOption : NSObject
objectivec获取消息选项。
| 类型 | 名称 |
|---|---|
| NSUInteger | limit |
| BIMMessage* | earliestMessage |
@property(nonatomic, assign) NSUInteger limit;
objectivec获取消息数量。
@property (nonatomic, strong) BIMMessage *earliestMessage;
objectivec获取拉消息起点。
typedef NS_ENUM(NSInteger, BIMMessageStatus)
objectivec消息状态。
| 类型 | 值 | 说明 |
|---|---|---|
| BIM_MESSAGE_STATUS_UNKNOWN | -1 | 未知状态。 |
| BIM_MESSAGE_STATUS_PENDING | 0 | 消息已插入数据库,正等待发送。 |
| BIM_MESSAGE_STATUS_SENDING | 1 | 正在发送消息的消息体及同步的拓展信息。 |
| BIM_MESSAGE_STATUS_SUCCESS | 2 | 消息已成功发送。 |
| BIM_MESSAGE_STATUS_FAILED | 3 | 消息发送失败。 |
| BIM_MESSAGE_STATUS_NORMAL | 5 | 消息已被接收。 |
typedef NS_ENUM(NSInteger, BIMMessageType)
objectivec消息类型。
| 类型 | 值 | 说明 |
|---|---|---|
| BIM_MESSAGE_TYPE_UNKNOWN | -1 | 未知消息。 |
| BIM_MESSAGE_TYPE_TEXT | 10001 | 文本消息。 |
| BIM_MESSAGE_TYPE_IMAGE | 10003 | 图片消息。 |
| BIM_MESSAGE_TYPE_VIDEO | 10004 | 视频消息。 |
| BIM_MESSAGE_TYPE_FILE | 10005 | 文件消息。 |
| BIM_MESSAGE_TYPE_AUDIO | 10006 | 音频消息。 |
| BIM_MESSAGE_TYPE_CUSTOM | 10012 | 自定义消息。 |
@interface BIMReferenceInfo : NSObject
objectivec引用消息信息。
| 类型 | 名称 |
|---|---|
| int64_t | serverMessageID |
| BIMMessageType | messageType |
| NSString* | hint |
| NSInteger | status |
@property (nonatomic, assign) int64_t serverMessageID;
objectivec服务端消息 ID。
@property (nonatomic, assign) BIMMessageType messageType;
objectivec消息类型。
@property (nonatomic, copy) NSString *hint;
objectivec业务透传的引用消息。
@property (nonatomic, assign) NSInteger status;
objectivec消息状态。
@interface BIMMessage : NSObject
objectivec消息体。
| 类型 | 名称 |
|---|---|
| BIMBaseElement* | element |
| NSDate* | createdTime |
| long | orderIndex |
| BIMMessageType | msgType |
| BIMReferenceInfo* | referenceInfo |
| long | senderUID |
| NSString* | uuid |
| NSString* | conversationID |
| BOOL | isRecalled |
| BIMMessageStatus | msgStatus |
| NSNumber* | serverMessageID |
| NSArray<NSNumber>** | mentionUIDList |
| NSDictionary* | ext |
@property (nonatomic, strong, readonly) BIMBaseElement *element;
objectivec获取消息 Element 数据,参看 BIMBaseElement。
@property (nonatomic, strong, nullable, readonly) NSDate *createdTime;
objectivec消息创建时间。
@property (nonatomic, assign, readonly) long long orderIndex;
objectivec消息排序 index。
@property (nonatomic, assign, readonly) BIMMessageType msgType;
objectivec消息类型,参看 BIMMessageType。
@property (nonatomic, strong, readonly) BIMReferenceInfo *referenceInfo;
objectivec引用消息,参看 BIMReferenceInfo。
@property (nonatomic, assign, readonly) long long senderUID;
objectivec消息发送者userID。
@property (nonatomic, strong, readonly) NSString *uuid;
objectivec消息客户端 ID。
@property (nonatomic, strong, readonly) NSString *conversationID;
objectivec消息所属的会话 ID。
@property (nonatomic, assign, readonly) BOOL isRecalled;
objectivec该消息是否被撤回
@property (nonatomic, assign, readonly) BIMMessageStatus msgStatus;
objectivec当前消息状态,参看 BIMMessageStatus。
@property (nonatomic, strong, nullable, readonly) NSNumber *serverMessageID;
objectivec消息和服务器交互时所需要的 ID,int64 类型,取值时请使用 longLongValue 防止截断。在消息没有被服务器再次分发到本地前,该值为 nil。
@property (nonatomic, strong, readonly) NSArray<NSNumber *> *mentionUIDList;
objectivec消息 at 用户列表,所有人用 0 表示。
@property (nonatomic, strong) NSDictionary *ext;
objectivec同步的拓展信息, 该拓展信息跟随消息一并发送,所有接受者能够获取到里面的值。
typedef NS_ENUM(NSInteger, BIMLogLevel)
objectivec输出的日志级别。
| 类型 | 值 | 说明 |
|---|---|---|
| BIM_LOG_DEBUG | 1 | debug。 |
| BIM_LOG_INFO | 2 | info。 |
| BIM_LOG_WARN | 3 | warn。 |
| BIM_LOG_ERROR | 4 | error。 |
@interface BIMSDKConfig : NSObject
objectivecSDK 初始化配置信息。
| 类型 | 名称 |
|---|---|
| BIMLogListener | logListener |
@property(nonatomic, copy) BIMLogListener logListener;
objectivec设置日志监听。
@interface BIMLiveMemberOnlineInfo : NSObject
objectivec直播群在线信息。
| 类型 | 名称 |
|---|---|
| long | conversationId |
| long | userID |
| BOOL | isInGroup |
| long | joinTime |
| long | lastPingTime |
@property (nonatomic, assign) long long conversationId;
objectivec获取会话 shortID。
@property (nonatomic, assign) long long userID;
objectivec获取用户 ID。
@property (nonatomic, assign) BOOL isInGroup;
objectivec当前是否在直播群 (在线)。
@property (nonatomic, assign) long long joinTime;
objectivec入群时间 (单位:ms)。
@property (nonatomic, assign) long long lastPingTime;
objectivec最后一次 ping 成功时间(单位:ms)。