我们正在努力实现XMPP了BOSH我们的产品.该Strophe.jsJavaScript库工作正常,我们上WWW网站的需求.我们请求预绑定,它已经交付,然后我们使用Strophe的'attach'方法来启动我们的会话 - 然后我们就能够更新状态和发送/接收消息.在iOS方面,我们使用的XMPPFramework是包含BOSH传输的robbiehanson ,但是没有附加方法.以下是我试图让它发挥作用的一些悲痛.
我预先绑定,得到我的sid/jid/rid,然后在bosh transport和其他文件中设置内部逻辑,说我们已经连接了.然后,如果我尝试更新状态,包括给定的SID,我发送:
BOSH:SEND [1248340729] = <body xmlns ="http://jabber.org/protocol/httpbind"sid ="568a3ae9"ack ="1248340728"rid ="1248340729"> <presence> </ presence> </ body >
但是没有得到任何答复.那是最后一个.如果我尝试更新状态而不指定SID,我发送:
BOSH:SEND [1064338700] = <body xmlns ="http://jabber.org/protocol/httpbind"ack ="1064338699"rid ="1064338700"> <presence> </ presence> </ body>
并回来:
BOSH:RECD [1342811427] = <body xmlns ="http://jabber.org/protocol/httpbind"xmlns:stream ="http://etherx.jabber.org/streams"authid ="9ef0ccdb"sid ="9ef0ccdb "secure ="true"requests ="2"inactivity ="300"polling ="5"wait ="60"> <stream:features> <mechanisms xmlns ="urn:ietf:params:xml:ns:xmpp-sasl "> <mechanism> PLAIN </ mechanism> </ mechanisms> <compression xmlns ="http://jabber.org/features/compress"> <method> zlib </ method> </ compression> <bind …
我有像Whatsapp这样的iOS聊天应用程序.聊天与XMPP协议运行良好.该应用程序具有其他功能,并且APNS服务运行良好.对于客户端,我正在使用XMPPFramework,以及使用PHP和Tigase的服务器用于XMPP服务器.
问题是:
当XMPP服务器收到他的消息并且他的存在是假的时,如何让服务器向用户发送推送通知?
谢谢!
我一直在为 mac 使用 Robbiehanson 的 xmpp 框架。在 mac 中使用仪器工具进行检查时,我观察到 XMPPParser.m 类中的泄漏(大约 64 字节)随着时间的推移逐渐增加。泄漏的代码已在下面给出。
attrNs = xmlNewNs(NULL, NULL, nodePrefix); CHECK_FOR_NULL(属性);
请提供此问题的解决方案...
包含此代码的方法粘贴在下面以供参考:
static void xmpp_xmlStartElement(void *ctx, const xmlChar *nodeName,
const xmlChar *nodePrefix,
const xmlChar *nodeUri,
int nb_namespaces,
const xmlChar **namespaces,
int nb_attributes,
int nb_defaulted,
const xmlChar **attributes)
{
NSLog(@"IN xmppStartElement");
int i, j;
xmlNsPtr lastAddedNs = NULL;
xmlParserCtxt *ctxt = (xmlParserCtxt *)ctx;
// We store the parent node in the context's node pointer.
// We keep this updated by "pushing" the …Run Code Online (Sandbox Code Playgroud) 当新用户向XMPP注册时出现问题.我无法在vCard上设置昵称,但是如果用户的vCard已经存在,那么同一段代码可以正常工作.
dispatch_queue_t queue = dispatch_queue_create("queue", DISPATCH_QUEUE_PRIORITY_DEFAULT);
dispatch_async(queue, ^{
XMPPvCardCoreDataStorage *xmppvCardStorage = [XMPPvCardCoreDataStorage sharedInstance];
XMPPvCardTempModule *xmppvCardTempModule = [[XMPPvCardTempModule alloc] initWithvCardStorage:xmppvCardStorage];
[xmppvCardTempModule activate:[self xmppStream]];
XMPPvCardTemp *myVcardTemp = [xmppvCardTempModule myvCardTemp];
if (myVcardTemp == nil) {
// I am stuck here, unable to create empty VCard for new User
}
else {
[myVcardTemp setNickname:@"iphone"];
[xmppvCardTempModule updateMyvCardTemp:myVcardTemp];
}
});
Run Code Online (Sandbox Code Playgroud)
在xmpp中第一次创建vcard的任何线索?
我正在使用xmppframework开发聊天应用程序,我已成功完成发送和接收消息,但是
1)如果我正在与用户A聊天并且用户B向我发送消息,我该如何识别用户B发送给我的消息.(我已经在核心数据中维护消息,因此将保存消息)2)如何识别接收到的消息是读取还是未读取
注意:用于保存消息
xmppMessageArchivingStorage = [XMPPMessageArchivingCoreDataStorage sharedInstance];
xmppMessageArchivingModule = [[XMPPMessageArchiving alloc] initWithMessageArchivingStorage:xmppMessageArchivingStorage];
Run Code Online (Sandbox Code Playgroud)
谢谢
我正在尝试通过SSL将我的用户从我的iOS XMPP聊天客户端连接到Openfire服务器.
在我的iOS客户端中:
- (void)setupStream
{
...
// BOOL values for security settings
customCertEvaluation = NO;
allowSelfSignedCertificates = YES;
allowSSLHostNameMismatch = NO;
}
Run Code Online (Sandbox Code Playgroud)
在我的Openfire服务器的安全设置 > 客户端连接安全性中,我设置了:
Required - Clients can only connect to the server using secured connections.
因此,将调用以下委托方法:
- (void)xmppStream:(XMPPStream *)sender willSecureWithSettings:(NSMutableDictionary *)settings
{
NSString *expectedCertName = [xmppStream.myJID domain];
if (customCertEvaluation)
[settings setObject:@(YES) forKey:GCDAsyncSocketManuallyEvaluateTrust];
if (allowSelfSignedCertificates)
[settings setObject:[NSNumber numberWithBool:YES] forKey:(NSString *)kCFStreamSSLAllowsAnyRoot];
if (allowSSLHostNameMismatch)
[settings setObject:[NSNull null] forKey:(NSString *)kCFStreamSSLPeerName];
else
if (expectedCertName) …Run Code Online (Sandbox Code Playgroud) 我正在制作用于图像发送和下载的聊天应用程序.我想在WhatsApp中做一些动画.那么,如何显示模糊的图像?我的图像是从服务器下载的.请帮我.
使用 xmppframework 创建聊天应用程序。当我尝试连接到服务器时,它会立即连接并断开连接并引发以下错误。
error domain=gcdasyncsocketerrordomain code=7 socket closed by remote peer
Run Code Online (Sandbox Code Playgroud)
Adium(聊天应用程序)软件上也会发生同样的情况。想知道在 AWS 服务器上设置 Openfire 时是否有任何设置错误。
https://community.igniterealtime.org/thread/50643
如果我需要执行任何步骤等,请告诉我。
谢谢阅读。
如何在我的名册中添加多个用户?现在我可以一次添加一个用户.但现在我必须与XMPP同步设备联系.使用后端API我可以过滤掉在应用程序中注册的联系人.现在将它们逐一添加到名册中需要花费太多时间.
那么有没有更快捷的方式将多个联系人添加到名册中?
我已经经历了很多像这样的问题,但是他们没有帮助.
并且过滤设备与后端API联系是一种很好的方法,还是我应该做其他事情?
我们正在为我们的应用程序使用XMPPFramework和 Openfire(版本:4.6.2)。
在杀死应用程序或将其置于后台模式后,它仍然显示用户在线几分钟,然后变为离线。
我们已经尝试过空闲连接策略时间,但仍然一无所获。
欢迎提出建议。