-1
我寫了創建空間的代碼。使用這個我創造了openfire的空間。如何在xmpp iphone中添加好友/用戶組?
-(void)createGroup:(NSString*)groupName
{
XMPPRoomCoreDataStorage *rosterstorage = [[XMPPRoomCoreDataStorage alloc] init];
xmppRoom = [[XMPPRoom alloc] initWithRoomStorage:rosterstorage jid:[XMPPJID jidWithString:[NSString stringWithFormat:@"%@@conference.%@/%@",groupName,@"server",self.strUsername]] dispatchQueue:dispatch_get_main_queue()];
[xmppRoom activate:[self xmppStream]];
[xmppRoom joinRoomUsingNickname:@"nickname" history:nil];
[xmppRoom addDelegate:self delegateQueue:dispatch_get_main_queue()];
[self performSelector:@selector(ConfigureNewRoom) withObject:nil afterDelay:5];
}
-(void)ConfigureNewRoom
{
[xmppRoom fetchConfigurationForm];
[xmppRoom configureRoomUsingOptions:nil];
}
現在我想添加組中的好友/用戶。所以我怎麼做到這一點?提前致謝。
嗨Hayro,Hardik正在詢問如何在聊天室中添加會員。您的答案解釋瞭如何將好友添加到好友列表,但沒有說明如何將其添加到聊天室中。 – Yogi