注册

请问iOS 上怎么实现群聊界面

ChatViewController * vc=[[ChatViewController alloc]initWithChatter:group.groupId conversationType:eConversationTypeGroupChat];这是我在首页写的代码
已邀请:

churk - 90hou

因为groupId程序崩溃下面是错误提示:*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFConstantString groupId]: unrecognized selector sent to instance 0x5edcf4'
 
 
如果把groupId改为@“jijoljlj”字符串就会发送不成功错误提示:
<message from='easemob-demo#chatdemoui_calldd@conference.easemob.com' to='easemob-demo#chatdemoui_northdoo@easemob.com/mobile' type='error' id='120373155335242328'><body>{&quot;to&quot;:&quot;calldd&quot;,&quot;from&quot;:&quot;northdoo&quot;,&quot;bodies&quot;:[{&quot;msg&quot;:&quot;而去&quot;,&quot;type&quot;:&quot;txt&quot;}]}</body><error code='404' type='cancel'><item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/><text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>Conference room does not exist</text></error></message>
这是数据类型错误吧,你传groupId传的不是NSString类型的么?
myChatroom.chatroomId是从哪传过来的。你这里聊天室的话,进入的时候就传聊天室的id和type就行了。你看看EMChatroom.h头文件。

要回复问题请先登录注册