Tag: xmppframework

消息的XMPPFramework“input..”状态

我正在使用robbiehanson / XMPPFramework为我目前的项目。 如何使用XMPPFramework获得消息input状态? 有XEP-184协议,但现在不赞成。 在这里需要帮助获取在iOS中撰写状态。 问候,Bhat

如何处理MUC聊天消息 – 复制消息

我使用XMPP框架实现了一对一的聊天。它在一对一的聊天中有广泛的支持。 消息归档和提取非常简单。 但是我看到,处理群聊消息保存和显示非常困难。 sorting和谓词失败。 显示重复的消息。 这是我join我的房间之前,我已经保存的消息) XMPPRoomCoreDataStorage *coreDataRoomStorage=[self appDelegate].xmppRoomCoreDataStorage; XMPPRoom *room=[[XMPPRoom alloc]initWithRoomStorage:coreDataRoomStorage jid:user.bareJid]; [room activate:[self appDelegate].xmppStream]; [room addDelegate:[self appDelegate] delegateQueue:dispatch_get_main_queue()]; [room joinRoomUsingNickname:user.user_name history:nil]; 我看到,有几个冗余的消息保存。 一条消息被保存3-4次。 我可能会做错什么。 有些身体会有帮助! 这是我在房间里发送信息的代码 – (NSFetchedResultsController *)fetchedResultsController{ if (fetchedResultsController == nil) { NSManagedObjectContext *moc = [[self appDelegate] managedObjectContext_message]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"XMPPMessageArchiving_Message_CoreDataObject" inManagedObjectContext:moc]; NSPredicate *predicate=[NSPredicate predicateWithFormat:@"bareJidStr=%@",_thisRoom.roomJID.bare]; NSSortDescriptor *sd1 = [[NSSortDescriptor […]

iOS XMPP群聊实施

我正在尝试使用robbiehanson XMPPframework创build聊天室。 由于我没有得到任何示例代码或文档,我自己尝试启动一个聊天室,如下所示: XMPPRoomMemoryStorage *rosterstorage = [[XMPPRoomMemoryStorage alloc] init]; XMPPRoom *xmppRoom = [[XMPPRoom alloc] initWithRoomStorage:rosterstorage jid:[XMPPJID jidWithString:@"test@mycompany.com/room"] dispatchQueue:dispatch_get_main_queue()]; [xmppRoom configureRoomUsingOptions:nil]; [xmppRoom activate:[UIAppDelegate xmppStream]]; [xmppRoom addDelegate:UIAppDelegate delegateQueue:dispatch_get_main_queue()]; [xmppRoom inviteUser:[XMPPJID jidWithString:jabberID] withMessage:@"Hi join room"]; 但是我在控制台中得到响应: RECV: <message xmlns="jabber:client" from="test@mycompany.com" to="user1@mycompany.com/42512304551337785705750233" type="error"><x xmlns="http://jabber.org/protocol/muc#user"><invite to="user2@mycompany.com"><reason>Hi join room</reason></invite></x><error code="503" type="cancel"><service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></message> 任何人有任何想法发起MUC?有没有任何示例代码?任何帮助将不胜感激..预先感谢..

添加CocoaAsyncSocket时,架构armv7的未定义符号

我想在xcode 4.2.1下使用XMPPFramework和一个iOS5项目(ARC),但是我正面临着这个问题。 一旦我添加CocoaAsyncSocket到我的项目作为准备我的项目使用XMPPFramework 1中的一部分,我得到以下错误。 我见过一些其他人拥有“未定义符号的build筑armv7”,但我目前还没有find这个问题的答案。 我已经链接到CFNetwork并将GCDAsyncSocket.m标记为非ARC(-fno-objc-arc),但是我仍然得到错误。 任何帮助表示赞赏。 Undefined symbols for architecture armv7: "_SSLGetBufferedReadSize", referenced from: ___33-[GCDAsyncSocket flushSSLBuffers]_block_invoke_0 in GCDAsyncSocket.o -[GCDAsyncSocket doReadData] in GCDAsyncSocket.o "_SSLSetIOFuncs", referenced from: -[GCDAsyncSocket ssl_startTLS] in GCDAsyncSocket.o "_SSLRead", referenced from: -[GCDAsyncSocket flushSSLBuffers] in GCDAsyncSocket.o -[GCDAsyncSocket doReadData] in GCDAsyncSocket.o "_SSLWrite", referenced from: -[GCDAsyncSocket doWriteData] in GCDAsyncSocket.o "_SSLClose", referenced from: -[GCDAsyncSocket closeWithError:] in GCDAsyncSocket.o […]

MUC如何与XMPPFramework

我正在开发一个利用Robbie Hanson的XMPPFramework的iOS XMPP聊天应用程序。 最重要的function已经实现 – 发送和接收消息。 基本上,我已经build立了一个基本的function聊天应用程序,当然有一点眼睛糖果。 现在,我遇到的问题是关于MUC。 我从其他网站看到的代码显示XMPPRoom中有一个initWithRoomName方法。 但是,这个方法在我克隆的git仓库中是不存在的。 那么,有什么替代呢? 或者,如果没有,我怎样才能使用XMPPFramework创build房间? 谢谢。

didReceiveInvitation()不在XMPPFramework和Swift 2中调用

我正在创build像Whatsapp聊天应用程序。 我已经成功编写了文字聊天,图像,audio,video传输的function。 现在我正在创build多用户聊天。 经过长时间的研发,我正在问这个问题。 请告诉我在我的代码中我做错了什么。 我遵循所有这些教程,但不是运气 https://github.com/robbiehanson/XMPPFramework/issues/640 MUC如何与XMPPFramework 接受聊天室邀请 好的,下面是我的代码 1.成功设置STREAM后,我在GoOnline方法中设置了邀请的XMPPMUC委托 private func goOnline() { let presence = XMPPPresence() let domain = xmppStream.myJID.domain if domain == "gmail.com" || domain == "gtalk.com" || domain == "talk.google.com" // || domain == "chat.alqatech.com" { let priority = DDXMLElement.elementWithName("priority", stringValue: "24") as! DDXMLElement presence.addChild(priority) } xmppMUC = XMPPMUC(dispatchQueue: dispatch_get_main_queue()) […]

如何保存和获取xmppGroupCoreDataStorageObject?

使用xmpp-messenger-ios ,我已经创build了组并设置了它的configuration并添加了用户,然后我想将组添加到xmppGroupCoreDataStorageObject存储中以将其列入OpenChatViewController表视图。 我如何将组数据保存到xmppGroupCoreDataStorageObject中: public class func addUserInCoreData(jid:String, users: Set<NSObject>) { let moc = OneRoster.sharedInstance.managedObjectContext_roster() as NSManagedObjectContext? let entity = NSEntityDescription.entityForName("XMPPGroupCoreDataStorageObject", inManagedObjectContext: moc!) let person = NSManagedObject(entity: entity!, insertIntoManagedObjectContext: moc!) person.setValue(jid, forKey: "name") person.setValue(users, forKey: "users") // Code breaks here. print(moc.debugDescription) do{ try moc?.save() let sucess = XMPPGroupCoreDataStorageObject.insertGroupName(jid, inManagedObjectContext: moc) print(sucess) } catch let error{ print(error) […]

未发送XMPPFramework消息

我接收来自Google Talk帐户的消息,它们显示在Ios仿真器的表视图中,但是当我发送它时,它不显示在Google Talk客户端(在另一台计算机中)中。 这是代码: -(IBAction)sendchat:(id)sender { General *general = [General sharedManager];//It is a singleton class used to store some values that need to be accesible in the whole application. NSXMLElement *body = [NSXMLElement elementWithName:@"body"]; text=[mensaje text]; NSLog(@"Texto en el body: %@", text); [body setStringValue:text]; NSArray *dest=[general.firstfrom componentsSeparatedByString:@"/"];//in firstfrom is stored the account from wich we […]

XMPPFramework – 如何创build一个MultiUserChat房间?

我怎样才能实现在iPhone使用XMPPFramework.I组休闲的代码,但房间没有创build。如何知道房间是否创build.XMPPRoomDelegate没有调用。当Stream断开,handleDidLeaveRoom方法调用。任何人都可以帮助我。提前致谢 #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 […]

iOS:XMPP:群聊消息的消息归档

所有的一对一聊天都以消息types作为聊天发送。 因此,消息存档技术(如下所示)对我保存/检索聊天logging工作良好。 // Setup message archiving xmppMessageArchivingStorage = [XMPPMessageArchivingCoreDataStorage sharedInstance]; xmppMessageArchiving = [[XMPPMessageArchiving alloc] initWithMessageArchivingStorage:xmppMessageArchivingStorage]; [xmppMessageArchiving setClientSideMessageArchivingOnly:YES]; // Activate xmpp modules [xmppMessageArchiving activate:xmppStream]; // Add delegate [xmppMessageArchiving addDelegate:self delegateQueue:dispatch_get_main_queue()]; 但对于群聊,发送的消息types是“群聊”,这不会被XMPPMessageArchivingCoreDataStorage存档 有人可以指导我如何实现群聊消息的消息存档。