使用XMPP我已经安装的Openfire到我的MAC的Openfire服务器。在opnefire服务器信息中,我的服务器名称是“john-imac.local.lan”,主机名是“john-imac.local.lan”连接到iOS中
我在那里创建了两个用户user123,user234。在我的iphone项目中,我使用gmail凭证时xmpp框架正常运行。要连接到openfire我做了这些变化
[xmppStream setHostName:@"john-imac.local.lan"];
xmppStream.myJID = [XMPPJID jidWithString:@"[email protected]"];
(void)xmppStreamDidConnect:(XMPPStream *)sender
{
NSLog(@"XMPP DID CONNECT");
[xmppStream authenticateWithPassword:@"user001" error:NULL];
}
我想这些都是我需要在我的项目中进行连接到Openfire的变化。但是,当我运行该应用程序我得到这个XMPP未验证
<failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized></not-authorized></failure>
是什么,我很想念。
我尝试相同的,但仍然没有成功... – sansid1983 2012-04-25 13:18:28
仍然有没有运气?我只是想知道还有什么可能是你的问题的原因! – Future2020 2012-04-27 22:18:13
多数民众赞成的工作,因为我设置服务器名普通文本,后改为IP地址=完全工作:) – meddlesome 2012-05-22 10:34:00