Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/101.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 无法连接到openfire服务器,没有错误或警告_Ios_Objective C_Xmpp_Openfire_Xmppframework - Fatal编程技术网

Ios 无法连接到openfire服务器,没有错误或警告

Ios 无法连接到openfire服务器,没有错误或警告,ios,objective-c,xmpp,openfire,xmppframework,Ios,Objective C,Xmpp,Openfire,Xmppframework,在遵循这一点并使用xmpp ios代码示例之后,我尝试连接到openfire服务器 代码如下 - (void)setupStream { NSLog(@"Setting up Stream"); xmppStream = [[XMPPStream alloc] init]; [xmppStream setHostName:@"52.0.99.122"]; [xmppStream setHostPort:5222]; NSLog(@"Setup XMPP connection credenti

在遵循这一点并使用xmpp ios代码示例之后,我尝试连接到openfire服务器

代码如下

- (void)setupStream
{
NSLog(@"Setting up Stream");

xmppStream = [[XMPPStream alloc] init];
[xmppStream setHostName:@"52.0.99.122"];
[xmppStream setHostPort:5222];

NSLog(@"Setup XMPP connection credentials");
#if !TARGET_IPHONE_SIMULATOR
{
    xmppStream.enableBackgroundingOnSocket = YES;
}
#endif

xmppReconnect = [[XMPPReconnect alloc] init];

[xmppReconnect  activate:xmppStream];

[xmppStream addDelegate:self         delegateQueue:dispatch_get_main_queue()];
}

我想知道是否有办法调试或至少看到一些错误消息。
谢谢。

您实现了“连接”方法吗?是的,我实现了,问题在于我的代理没有使用多播代理,并且认为它是可选的