ios - XMPPFramework - Retrieve name associated with a JID -


in openfire users created "username" (which used basis jid) , descriptive "name". how 1 retrieve name given jid in xmpp? i'm using xmppframework.

you may retrieve user's display name using jid xmppusercoredatastorageobject this:

xmppjid *userjid = @"shakespeare";  xmppusercoredatastorageobject *user = [[[self appdelegate] xmpprosterstorage]                                            userforjid:userjid                                            xmppstream:[[self appdelegate] xmppstream]                                  managedobjectcontext:[[self appdelegate] managedobjectcontext_roster]];  nsstring *userdisplayname = user.displayname; 

Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -