How to get information about an XMPP user

I need to get user information stored on openfire server.

XMPPvCardCoreDataStorage* xmppvCardStorage = [XMPPvCardCoreDataStorage sharedInstance];
XMPPvCardTempModule* m = [[XMPPvCardTempModule alloc] initWithvCardStorage:xmppvCardStorage];
[m fetchvCardTempForJID:[sender myJID]];

      

How / where can I read the query result? Correct way to "query" the openfire server?

I've also tried:

XMPPIQ *iq = [[XMPPIQ alloc] initWithType:@"get"];
[iq addAttributeWithName:@"id" stringValue:@"v1"];
[iq addAttributeWithName:@"from" stringValue:[NSString stringWithFormat:@"%@", sender]];
[iq addAttributeWithName:@"type" stringValue:@"get"];
DDXMLElement *query = [DDXMLElement elementWithName:@"vCard" xmlns:@"vcard-temp"];
[iq addChild:query];
[_xmppStream sendElement:iq];

      

If the sender is the XMPPJID of the user you were looking for.

The XMPPIQ was sent successfully and the debugger enters the method:

- (XMPPIQ *)xmppStream:(XMPPStream *)sender willReceiveIQ:(XMPPIQ *)iq;

      

If I print iq, I:

<iq xmlns="jabber:client" type="result" id="v1" to=<MYJID> >
    <vCard xmlns="vcard-temp"/>
</iq>

      

+3
objective-c xmpp xmppframework openfire


source to share


No one has answered this question yet

Check out similar questions:

1665
How can I get the UITextField to move upward when there is a keyboard - when starting editing?
1276
How can I disable ARC for one file in a project?
1244
How can I sort NSMutableArray with custom objects in it?
1180
How can I check if a string contains another string in Objective-C?
7
How to get history of one chat from Openfire using asmack android
0
User presence not getting xmpp ios
0
How to parse array with specific key in iphone
0
Openfire: list not returned to user
0
IOS user blocks the use of XEP-0191
-1
How to add friend / user to group in xmpp iphone?



All Articles
Loading...
X
Show
Funny
Dev
Pics