开发者

Connect to XMPPRoom

开发者 https://www.devze.com 2023-04-13 03:24 出处:网络
Im using XMPPframework to create a chat fo开发者_JAVA百科r iphone. Im trying to connect the user to a certain chat room, but I can\'t do it.

Im using XMPPframework to create a chat fo开发者_JAVA百科r iphone. Im trying to connect the user to a certain chat room, but I can't do it.

This is the code I have:

BOOL activado = [salaChat activate:[[self appDelegate] xmppStream]];    
[salaChat joinRoom];
[salaChat sendMessage:@"HELLO"];

BOOL unido = [salaChat isJoined];

Being salaChat a XMMPPRoom object.

"activado" is always true but "unido" never.

test_android is the username and "retiro" is the room id. Maybe the mistake is there but I tried many ways and still nothing.

Any ideas?

Thanks.


see http://mobile.tutsplus.com/tutorials/iphone/building-a-jabber-client-for-ios-xmpp-integration/


Ok, solved it, I was putting wrong the name of the room.

It should be "roomid@conference.127.0.0.1" and nickname , the users nickname.

0

精彩评论

暂无评论...
验证码 换一张
取 消