发送图片消息
UIImageView *igv = [[UIImageView alloc] init];
[igv setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",[UserInfo sharedUserInfo].baseurl ,[dict objectForKey:@"rewardGiftImg"]]]];
RCImageMessage *imageMessage = [RCImageMessage messageWithImage:igv.image];
[[RCIM sharedRCIM]sendMediaMessage:ConversationType_PRIVATE targetId:[dict objectForKey:@"fromUserId"] content:imageMessage pushContent:nil pushData:nil progress:nil success:nil error:nil cancel:nil];
发送文字消息
RCTextMessage *ms = [RCTextMessage messageWithContent:[[zhaoDic objectForKey:@"msg"] decodeBase64String]];
ms.senderUserInfo = userInfo;
[[RCIM sharedRCIM] sendMessage:ConversationType_PRIVATE targetId:[zhaoDic objectForKey:@"userId"] content:ms pushContent:nil pushData:nil success:nil error:nil];
网友评论