title: iOS XMPP Framework XMPPStream Not Connecting?
body: <p>I'm trying to connect to a public XMPP server using the XMPPFramework on iOS. I set up the connection when the app loads in the </p>
  
  <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  {
      self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
      // Override point for customization after application launch.
      // Set up XMPP stream
  
      self.xmppStream = [[XMPPStream alloc] init];
      [self.xmppStream addDelegate:self delegateQueue:dispatch_get_main_queue()];
  
      self.xmppStream.hostName = @"jabber.web.id";
      self.xmppStream.hostPort = 5222;
  
      [self connect];
  </code></pre>
  
  <p>In connect:</p>
  
  <pre><code>- (void)connect {
      NSString *username = @"eric1234";
      self.password = @"test123";
  
      [self.xmppStream setMyJID:[XMPPJID jidWithString:username]];
  
      NSError *error = nil;
      if (![self.xmppStream oldSchoolSecureConnectWithTimeout:XMPPStreamTimeoutNone error:&amp;error])
      {
          UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Error"
                                                              message:[NSString stringWithFormat:@"Can't connect to server %@", [error localizedDescription]]
                                                             delegate:nil
                                                    cancelButtonTitle:@"Ok"
                                                    otherButtonTitles:nil];
          [alertView show];
      }
  
      NSLog(@"%hhd", [self.xmppStream isConnected]);
  }
  </code></pre>
  
  <p>And then my delegate method: </p>
  
  <pre><code>- (void)xmppStreamDidConnect:(XMPPStream *)sender {
      NSError *error = nil;
      if (![self.xmppStream authenticateWithPassword:self.password error:&amp;error]) {
          UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Error"
                                                              message:[NSString stringWithFormat:@"Can't authenticate %@", [error localizedDescription]]
                                                             delegate:nil
                                                    cancelButtonTitle:@"Ok"
                                                    otherButtonTitles:nil];
          [alertView show];
      }
      [self.xmppStream sendElement:[XMPPPresence presence]];
  }
  </code></pre>
  
  <p>xmppStreamDidConnect is never called. I'm not sure why, I've registered eric1234 successfully on jabber.web.id using a desktop XMPP client on the server. Any ideas?</p>