I'm working on an iOS app with XMPPFramework and Openfire Server. I work with a book to implement it, but there are some parts I don't understand because the book makes references to Google Talk and I can't figure out what to do in those methods:
The first one is about presence, here is the code that is implemented in the book:
-(void)goOnline
{
XMPPPresence *presence = [XMPPPresence presence];
NSString *domain = [self.xmppStream.myJID domain];
// Google set their presence priority to 24, so we do the same to be compatible.
if ([domain isEqualToString:@"gmail.com"] || [domain isEqualToString:@"gtalk.com"])
{
NSXMLElement *priority = [NSXMLElement elementWithName:@"priority" stringValue:@"24"];
[presence addChild:priority];
}
[[self xmppStream] sendElement:presence];
[self.rootViewController updateStatus:@"online"];
}
As I'm working on localhost with my own server name, I don't know exactly what to do with presence or if Openfire have a value for the presence priority.