Send message via XMPPFramework for iOS

How to send message via XMPPFramework for objc and ios?

Now he really bothers me. I need to create my own method using special XML and send it to a specific JID.

Any ideas?

Thanks.

+7
source share
1 answer
NSXMLElement *body = [NSXMLElement elementWithName:@"body"]; [body setStringValue:textvalue]; NSXMLElement *message = [NSXMLElement elementWithName:@"message"]; [message addAttributeWithName:@"type" stringValue:@"chat"]; [message addAttributeWithName:@"to" stringValue:[jid full]]; [message addChild:body]; [[self xmppStream] sendElement:message]; 

try it

+13
source

All Articles