我怎样才能使用XMPPFramework.I试图休耕代码实现群聊在iPhone,但房间没有created.How我可以知道房间是否被创建或not.XMPPRoomDelegate不called.When流断开,handleDidLeaveRoom方法called.Can任何一个可以帮助我。提前致谢
#define XMPP_HOSTNAME_2 @"chat.someservername.com"
#define XMPP_JID @"venkat@chat.someservername.com"
#define XMPP_PASSWORD @"venkat"
#define ROOM_JID @"venkat_muc@conference.chat.someservername.com/iMac"
- (void)mucSetupStream
{
xmppStream = [[XMPPStream alloc] init];
xmppStream.hostName = XMPP_HOSTNAME_2;
xmppStream.myJID = [XMPPJID jidWithString:XMPP_JID];
[xmppStream addDelegate:self delegateQueue:dispatch_get_main_queue()];
// Configure xmppRoom
XMPPJID *roomJID = [XMPPJID jidWithString:ROOM_JID];
xmppRoomStorage=[XMPPRoomCoreDataStorage sharedInstance];
xmppRoom = [[XMPPRoom alloc] initWithRoomStorage:self jid:roomJID dispatchQueue:dispatch_get_current_queue()];
[xmppRoom activate:xmppStream];
[xmppRoom addDelegate:self delegateQueue:dispatch_get_main_queue()];
// Start connection process
NSError *err = nil;
if (![xmppStream connect:&err])
{
DDLogError(@"YapTesting: Cannot connect: %@", err);
}
[self performSelector:@selector(ConfigureNewRoom) withObject:nil afterDelay:5];
}
- (void)ConfigureNewRoom
{
NSLog(@"The Room is Configure After 5 Secs");
[xmppRoom fetchConfigurationForm];
[xmppRoom configureRoomUsingOptions:nil];
}