Yammer IOS SDK Doesn't Display Attachments -
with yammer ios sdk, getting image attachment message not display image. call works javascript sdk not ios sdk.
-(void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath{ //navigate attachment screen if ([[[arrmessages objectatindex:indexpath.row] valueforkey:@"attachments"] count] > 0) { nslog(@"attachments : %@", [[arrmessages objectatindex:indexpath.row] valueforkey:@"attachments"]); nslog(@"content class : %@", [[[[arrmessages objectatindex:indexpath.row] valueforkey:@"attachments"] firstobject] valueforkey:@"content_class"]); nsstring *strcontentclass = [nsstring stringwithformat:@"%@", [[[[arrmessages objectatindex:indexpath.row] valueforkey:@"attachments"] firstobject] valueforkey:@"content_class"]]; if ([strcontentclass isequaltostring:@"image"] || [strcontentclass isequaltostring:@"video"]) { detailview *detaild = (detailview *)[[self storyboard] instantiateviewcontrollerwithidentifier:@"detailview"]; detaild.isfromattachment = yes; if ([strcontentclass isequaltostring:@"video"]) { detaild.isforvideo = yes; }else { detaild.isforvideo = no; } detaild.dicofcontents = [[[arrmessages objectatindex:indexpath.row] valueforkey:@"attachments"] firstobject]; [[self navigationcontroller] pushviewcontroller:detaild animated:yes]; } }
}
i'm not sure you're expecting piece of code do, or how api not match expectations. can share json of message not showing result expect? attachment image, example, contains properties "download_url", "thumbnail_url", etc.
Comments
Post a Comment