开发者

Connect to XMPPRoom

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜