环信3.0发图片EMImageMessageBody消息返回Message invalid
环信3.0发图片EMImageMessageBody消息返回错误Message invalid
是传入一个image的nsdata类型么?
这种转data可以么?
//*******
UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage];
NSData *data = UIImagePNGRepresentation(image);
//**********
EMImageMessageBody *body = [[EMImageMessageBody alloc] initWithData:mySendMessageModel.imageModel.imageData displayName:@"image.png"];
NSString *from = [[EMClient sharedClient] currentUsername];
EMMessage *message = [[EMMessage alloc] initWithConversationID:_conversationUserID from:from to:_conversationUserID body:body ext:nil];
message.chatType = EMChatTypeChat;
是传入一个image的nsdata类型么?
这种转data可以么?
//*******
UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage];
NSData *data = UIImagePNGRepresentation(image);
//**********
EMImageMessageBody *body = [[EMImageMessageBody alloc] initWithData:mySendMessageModel.imageModel.imageData displayName:@"image.png"];
NSString *from = [[EMClient sharedClient] currentUsername];
EMMessage *message = [[EMMessage alloc] initWithConversationID:_conversationUserID from:from to:_conversationUserID body:body ext:nil];
message.chatType = EMChatTypeChat;
没有找到相关结果
已邀请:
1 个回复
[已注销]