0
votes

I am writing an iOS app that features anonymous multi-user chat. All the users logged in using

[self xmppStream] authenticateAnonymously:&error]

So they all have random bare JID. What I am trying to achieve here is implement anonymous multi-user chat with avatar, I've done some research in the documentation but is still unclear on how I could do this.

Some of the questions that I am still not understanding yet:

  1. Can anonymous user have a vcard? If this is possible, will the server automatically delete the vcard for the anonymous user once he disconnected? (I am running OpenFire)

  2. What is the most efficient way to implement this avatar enabled anonymous MUC? What I am thinking right now is to get a list of occupants (not sure how to do this) when a user enters the room, and when a user speaks, download the user avatar if it is not stored or it has been changed (don't know how to do this as well)

If you could provide some sample codes to get me started, I would really appreciate it.

Thank you for your time!

1

1 Answers

0
votes

XMPPvCardTempModule with XMPPvCardTempCoreDataStorage and XMPPvCardAvatarCoreDataStorage will do the job for you, check iPhoneXMPP project from XMPPFramework for example usage. The only difference in anonymous usage is that you need to publish your own vCard on every login.