Tag: xmpp

在获取聊天logging的同时,我没有从Openfire获取两个用户历史logging

我从openfire中通过在明火中安装开放式火狐插件来获取历史logging,并尝试使用此代码。 let iq1 = DDXMLElement(name: "iq") iq1.addAttribute(withName: "type", stringValue: "get") iq1.addAttribute(withName: "id", stringValue: "0") let retrieve = DDXMLElement(name: "retrieve", xmlns: "urn:xmpp:archive") retrieve?.addAttribute(withName: "with", stringValue: "raman@ip-172-31-53-77.ec2.internal") let set = DDXMLElement(name: "set", xmlns: "http://jabber.org/protocol/rsm") let max = DDXMLElement(name: "max", stringValue: "50") iq1.addChild(retrieve!) retrieve?.addChild(set!) set?.addChild(max) stream?.send(iq1 ) 现在我没有从双方获得历史。 这是我得到的结果。 <iq xmlns="jabber:client" type="result" id="0" to="bentick@ip-172-31-53-77.ec2.internal/5qsinh1syg"> <chat xmlns="urn:xmpp:archive" with="raman@ip-172-31-53-77.ec2.internal" start="2017-02-07T06:28:33.691Z"> […]

XEP – 0055与iOS和ejabberd?

我正在尝试实现由ejabbed支持的XEP-0055,如支持的xeps所示 这是我的要求: XMPPIQ *iq = [[XMPPIQ alloc] init]; [iq addAttributeWithName:@"type" stringValue:@"get"]; [iq addAttributeWithName:@"from" stringValue:@"testuser1@company.com"]; [iq addAttributeWithName:@"to" stringValue:@"company.com"]; [iq addAttributeWithName:@"id" stringValue:@"search1"]; XMPPElement *query = [XMPPElement elementWithName:@"query"]; [query setXmlns:@"jabber:iq:search"]; [iq addChild:query]; [self.xmppStream sendElement:iq]; 我得到这个回应: <iq xmlns="jabber:client" from="company.com" to="testuser1@company.com/2834146151141475281662718" type="error" id="search1"> <query xmlns="jabber:iq:search"/> <error code="501" type="cancel"> <feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/> </error> </iq> 为什么我收到的function没有实现? 链接到官方的XEP 描述。

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存档 有人可以指导我如何实现群聊消息的消息存档。

XMPP聊天应用程序被拒绝使用VoIP服务作为背景模式

我已经做了一个XMPP聊天应用程序,我使用Voip服务来获取VoIP密钥,以便在后台接收聊天消息。 function一切正常,但应用程序商店拒绝了应用程序,如下所示: 2.16:多任务应用程序可能只使用后台服务达到预期目的:VoIP,audio播放,位置,任务完成,本地通知等。 2.16我们发现您的应用程序使用后台模式,但不包括需要该模式持久运行的function。 这种行为不符合App Store评论指南。 我们注意到您的应用程序在Info.plist的UIBackgroundModes项中声明了对VoIP的支持,但不提供任何IP语音服务。 我们认识到,VoIP可以提供许多应用程序function要使用的“保持活跃”function。 然而,以这种方式使用VoIP不是VoIP的预期目的,正如“iOS应用程序编程指南”中所指出的那样:“因特网协议语音(VoIP)应用程序允许用户使用Internet连接进行电话呼叫而不是设备的手机服务“。 添加VoIPfunction或从UIBackgroundModes键删除“VoIP”设置是适当的。对于离散的代码级问题,您可能希望咨询Apple开发者技术支持。 当DTS工程师跟进你时,请准备好提供: 你的拒绝问题的完整细节 截图 重现问题的步骤 符号化的崩溃日志 – 如果您的问题导致崩溃日志 如果您在重现已报告的问题时遇到困难,请尝试按https://developer.apple.com/library/ios/qa/qa1764/ TechnicalQ&A QA1764:如何重现仅适用于应用程序审查的崩溃或错误用户正在看到。 我需要从某人那里得到一个有力的答案,这样我才能使这个function正常工作,同时也能被批准用于App Store。 我认为拒绝发生在iOS 7发布之后。我需要iOS 7发布后上传XMPP聊天应用程序的人的帮助

iOS XMPP通过用户名search用户

我第一次在iOS上使用XMPP框架。 任何人都可以帮助使用他们的用户名search用户。 我已经尝试了下面的链接描述的方式。 但没有运气。 iOS XMPP框架获取所有注册用户 提前致谢。

什么是XMPP,以及如何在iOS聊天应用程序中使用它?

我想为iPhone创build一个聊天客户端应用程序。 我读过XMPP框架是最好的使用之一。 不过,我还没有在这方面find太多的资料,只有Google Code上的XMPPFramework和一个wiki上的详细资料。 任何人都可以解释什么是XMPP,以及我们如何在我们的聊天应用程序中使用它? 是否有任何教程或代码片段,展示了它的用途?

在发送大尺寸图像,video和audio时断开XMPP客户端

我已经使用robbiehanson xmpp例子实现了xmpp。 我可以聊天,也能够发送图像。 我发送的图像被转换为​​nsdata,并进一步转换为Base64String,然后发送string [self.xmppStream sendElement:message]; 这样,如果图像的大小很小,我可以立即发送,但如果图像的大小更大的两个xmpp用户断开连接,文件不传输。 video和audio也会发生同样的情况。 虽然我能够使用压缩图像 UIImageJPEGRepresentation(image,0.005); 但如何发送video和audio的大小显然是很大的。 我已经阅读了XEP – 0065和XEP – 0096的文档,但无法以适当的方式实现。 请让我知道为什么用户断开连接,为什么我不能使用base64传输繁重的文件,也分享了可以帮助我传输video和audio的代码。 真的很感激你的帮助。

XMPPFramework – 创build一个XMPPRoom

我一直在尝试使用下面提到的代码创build一个XMPPRoom,我已经在线查看了各种示例,但是当我使用此代码时,委托xmppRoomDidCreate或xmppRoomDidJoin委托不会被调用。 我不知道我在这里做错了什么? PS:xmppStream的代表确实被调用,但它被连接和授权,但问题是XMPPRoom委托… – (void)createChatRoom { NSString *jabberID = @"abcxyz@testservice.com"; self.xmppStream.hostName = @"testservice.com"; self.xmppStream = [[XMPPStream alloc]init]; [self.xmppStream addDelegate:self delegateQueue:dispatch_get_main_queue()]; [self.xmppStream setMyJID:[XMPPJID jidWithString:jabberID]]; NSError *error = nil; if (![self.xmppStream connectWithTimeout:XMPPStreamTimeoutNone error:&error]) { UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Error" message:[NSString stringWithFormat:@"Cannot connect to server %@",[error localizedDescription]] delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil]; [alert show]; return; } // Configure xmppRoom XMPPJID […]

使用XMPP在ios中构build聊天应用程序

我正在尝试在ios中构build一个聊天应用程序。 我偶然发现了ios的XMPP 。 我对如何前进感到困惑。 这是我的疑惑: 我是否需要创build一个XMPP服务器来实现这个应用程序? 还是有任何现有的服务器/服务可以用于相同的目的?