ios - Save received image in XMPP chat -
to store image received xmpp chat tried use code
- (void)xmppstream:(xmppstream *)sender didreceivemessage:(xmppmessage *)message{nsstring *attachment = [[message elementforname:@"attachement"] stringvalue]; // getting string data here if(attachment.length > 0) { //save image in local folder of app nsdata *data = [attachment datausingencoding:nsutf8stringencoding]; // got data here uiimage *image = [uiimage imagewithdata:data]; // getting nil image here}
in code getting nil in "image" object. should change here save received image via xmppp chat.
Comments
Post a Comment