0
在這裏,我已經把它貼的代碼下降XMPP羣聊接收邀請:如何使用Objective C的
NSXMLElement *imessage = [NSXMLElement elementWithName:@"message"];
[imessage addAttributeWithName:@"from" stringValue:[[xmppStream myJID]full]];
[imessage addAttributeWithName:@"to" stringValue:roomName];
NSXMLElement *xelem = [NSXMLElement elementWithName:@"x" xmlns:XMPPMUCUserNamespace];
NSXMLElement *decline = [NSXMLElement elementWithName:@"decline"];
[decline addAttributeWithName:@"to" stringValue:roomName];
NSXMLElement *reason = [NSXMLElement elementWithName:@"reason"];
[reason setStringValue:@"Sorry Dear, I can not join right now."];
[decline addChild:reason];
[xelem addChild:decline];
[imessage addChild:xelem];
任何一個可以解決[請告訴我我的錯誤。
歡迎,請不要添加圖像作爲代碼。 – karan
你得到什麼錯誤? – karan
我不能拒絕組聊天接收邀請...該代碼不起作用 – Subramani