【发布时间】:2013-06-11 13:06:20
【问题描述】:
我正在使用 xcode 4.5 从此链接下载示例项目。 http://mobile.tutsplus.com/tutorials/iphone/building-a-jabber-client-for-ios-interface-setup/
无法编译。框架丢失了。所以我从 这个链接...https://github.com/robbiehanson/XMPPFramework ...最后我可以编译了。
然后我添加我的主机名 setupStream
-(void)setupStream {
NSLog(@"setupStream");
xmppStream = [[[XMPPStream alloc] init]autorelease];
xmppStream.hostName=@"talk.google.com";
//xmppStream.hostPort=5222;
[xmppStream addDelegate:self delegateQueue:dispatch_get_main_queue()];
}
但是什么都不会发生..委托方法
-(void)xmppStreamDidConnect:(XMPPStream *)sender {
NSLog(@"didReceiveMessage");
isOpen = YES; NSError *error = nil;
[[self xmppStream] authenticateWithPassword:password error:&error];
}
-(void)xmppStreamDidAuthenticate:(XMPPStream *)sender {
NSLog(@"didReceiveMessage");
[self goOnline];
}
没有被调用。缺少什么。请帮助我..
【问题讨论】:
标签: iphone ios xmppframework