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
Post a Comment