cocoaPod三方库依赖
整体架构
本地远程消息切换
- 消息发送端
#ifdef LocalMessage
self.groupChatView.groupChatModel = [LiveChatModel createGroupChatModelWithDict:dict];
#else
[[JHIMEngine share] sendCustomGroupMessage:dict];
#endif
- 消息接收端(仅限远程消息情况下)
1、<JHIMEngineProtocol>添加远程消息接收回调委托
2、[JHIMEngine share].delegate = self;回调新消息到GroupChatView
3、实现IM群消息回调方法
-(void)groupMessage:(id)messageDict{
NSDictionary *dict = (NSDictionary*)messageDict;
self.groupChatModel = [LiveChatModel mj_objectWithKeyValues:dict];
}
内存管理
富文本键盘