@Sahil,
I believe if you want to create a permanent channel for a user, it will have to be stored and retrieved from a server and verified to be unique.
Another way to issue a user a unique channel would be if ALL users were Game Center Members and you could get their username and add some numbers to it and issue it to them as their private channel. This would insure all usernames and private channels were unique bypassing the need for a server, but everyone would have to be a GameCenter user.
I don’t understand this…
@Sahil wrote:
“the only problem i am facing is i am not getting the reference to the user2’s pub and sub keys so as to send a message privately.”
The Pub and Sub Keys are the same for all the users in your chat room. They are for your account and don’t change.
The private “Channel” is what changes and should be unique for each user in some shape or form.
I’ve got to ask you a question. Have you created a lobby system, or how do your users connect originally?
Nail