0
votes

Note:- Before down grade question read description.

We are implement ejabberd for chat application personal chat working fine with all functionality. now we need to create permanent group using ejabberd MUC/SUB service.

We read https://docs.ejabberd.im/developer/xmpp-clients-bots/proposed-extensions/muc-sub/ documents.

Now my question is that how we can send all this IQ using iOS if you guys have any demo or sample code then share here.

We also try with PHP rest API but not getting any presence or ping into iOS application.

1

1 Answers

0
votes

Ejabberd never remember groupJID which is created by us. but you can achieve with the help of web service by storing group info while creating group and every-time fetch group info from server and join manually,

 let xmppRoom = self.getRoomObject(roomJid: roomID.appending(GroupConfernce))

 let history = DDXMLElement.element(withName: "history") as! DDXMLElement

 history.addAttribute(withName: "maxstanzas", stringValue: "10")

 xmppRoom.addDelegate(self.appDelegate, delegateQueue: DispatchQueue.main)
 xmppRoom.join(usingNickname: self.appDelegate.xmppStream?.myJID.user, history: history)

otherwise you can use MongooseIM Server, it has capability to remember group info and no need of any manual process.

check below link

https://github.com/esl/MongooseIM