How do I send a message through the XMPPFramework for objc and ios?
Its really bugging me now. I need to build a custom method with some custom XML and send it to a specific JID.
Any ideas?
Thank you.
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 this
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With