Send an Image with MSMessage

Hi,

I'm finishing the iMessage Extension but I've a little problem, I want to send a simple Image using MSMessage.

Now I Use this Code :

    MSMessage *message = [[MSMessage alloc] init];
    MSMessageTemplateLayout *layout = [[MSMessageTemplateLayout alloc]init];

    [layout setImage:myImage];
     message.layout = layout;
   
    [savedConversation insertMessage:message completionHandler:^(NSError *error) {
     
    }];


But I don't want to use the MSMessateTemplateLayout I want only send a simple Image.

How can I do this?


Thanks

Fulvio

Replies

It sounds like you want to use insertAttachment instead of insertMessage.