你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
输入关键字进行搜索
搜索:
没有找到相关结果
Half12345
Benight
frank
lizilong - 80后程序猿
要回复问题请先登录或注册
9 个回复
Half12345
2、断点看下发送失败的errorcode是什么?
3、你发送的消息类型是什么?单聊,群聊还是聊天室?
Benight
EMMessage *tempMessage = [ChatSendHelper sendTextMessageWithString:textMessage
toUsername:_conversation.chatter
messageType:[self messageType]
requireEncryption:NO
ext:ext];
[self addMessage:tempMessage];
2.错误: EMErrorNotFound = 404, //不存在
3.发送的消息类型是群聊
Half12345
asyncSendMessage:retureMsg
progress:nil];这句才是发消息的接口。
参考:
// 发送消息
+(EMMessage *)sendMessage:(NSString *)username
messageBody:(id<IEMMessageBody>)body
messageType:(EMMessageType)type
requireEncryption:(BOOL)requireEncryption
ext:(NSDictionary *)ext
{
EMMessage *retureMsg = [[EMMessage alloc] initWithReceiver:username
bodies:@[body]];
retureMsg.requireEncryption = requireEncryption;
retureMsg.messageType = type;
retureMsg.ext = ext;
EMMessage *message = [[EaseMob sharedInstance].chatManager
asyncSendMessage:retureMsg
progress:nil];
return message;
}
2、断点看下你message里面的各个参数都有没有问题,群组id是不是对的。
Benight
Half12345
Benight
Benight
frank
lizilong - 80后程序猿