我正在使用 xcode 4.5 http://mobile.tutsplus.com/tutorials/iphone/building-a-jabber-client-for-ios-interface-setup/从此链接下载示例项目。
无法编译。框架丢失了。所以我从这个链接下载了框架工作...... https://github.com/robbiehanson/XMPPFramework ...filnaly 我能够编译。
然后我添加我的主机名 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];
}
没有被调用。缺少什么。请帮助我..