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

Popular posts from this blog

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -