【发布时间】:2012-04-16 00:53:42
【问题描述】:
我已经在我的 mac 中安装了 openfire。在 opnefire 服务器信息中,我的服务器名称是“john-imac.local.lan”,主机名是“john-imac.local.lan”
我在那里创建了两个用户 user123,user234。在我的 iphone 项目中,当我使用 gmail 凭据时,我的 xmpp 框架运行良好。为了连接到 openfire,我做了这些更改
[xmppStream setHostName:@"john-imac.local.lan"];
xmppStream.myJID = [XMPPJID jidWithString:@"user123@john-imac.local.lan"];
(void)xmppStreamDidConnect:(XMPPStream *)sender
{
NSLog(@"XMPP DID CONNECT");
[xmppStream authenticateWithPassword:@"user001" error:NULL];
}
我想这些是我需要在我的项目中进行的更改才能连接到 Openfire。但是当我运行应用程序时,我得到了这个 XMPP DID NOT AUTHENTICATE
<failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized></not-authorized></failure>
我错过了什么。
【问题讨论】: