xmppframework 使用遇到问题记录(2016-02-26 14:40)   原记录草稿一直未发布。。。

 

1. 今天在尝试注册和登陆用户时,注册成功,但是登陆提示: (<failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/></failure>)

  domain 为服务端openfire 中xmpp.domain 中填写的值,一般服务器配置,其和地址一样,所以大部分例子中都不需要设置hostname 及 hostport ,如果能注册不能登陆,有可能是这个问题

  [self.xmppStream setMyJID:[XMPPJID jidWithUser:myJID domain:@"tl" resource:@"ios"]];

    [self.xmppStream setHostName:@"www.zhenhaoxueya.com"];

    [self.xmppStream setHostPort:5222];

    self.password = myPassword;

posted on 2017-10-16 16:44  纵横九洲  阅读(164)  评论(0)    收藏  举报