Question

I am creating a chat application in iPhone, I want to display the roster's with current presence, but i got all roster's ID.

NSXMLElement *queryElement = [iq elementForName: @"query" xmlns: @"jabber:iq:roster"];

if (queryElement) {
    NSArray *itemElements = [queryElement elementsForName: @"item"];
    [cts removeAllObjects];
    for (int i=0; i<[itemElements count]; i++) {

        NSString *jid = [[[itemElements objectAtIndex:i] attributeForName:@"jid"] stringValue];
        [cts addObject:jid];
    }
}
NSLog(@"Roster ID's %@",cts);

this is the code for i am getting all rosters id's, i want to get presence and status and etc.,

How can I get Please Help Me.

Thanks In Advance

Was it helpful?

Solution

This is the one of best xmpp framework for iOS I found and its working perfectly. XMPPFramwork from Robbiehnson

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top