title: iOS XMPPFramework Not Sending Presence
body: <p>My xmpp stream connects successfully and in the callback I attempt to send out the presence of the user. However, I keep getting this error: Error Domain=XMPPStreamErrorDomain Code=1 "The operation couldn’t be completed. (XMPPStreamErrorDomain error 1.)"</p>
  
  <p>My connect method:</p>
  
  <pre><code>- (void)connect {
      NSString *username = @"masa060295@jabber.web.id";
      self.password = @"test123";
  
      [self.xmppStream setMyJID:[XMPPJID jidWithString:username]];
  
      NSError *error = nil;
      if (![self.xmppStream connectWithTimeout: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];
      }
  }
  </code></pre>
  
  <p>My callback:</p>
  
  <pre><code>- (void)xmppStreamDidConnect:(XMPPStream *)sender {
      NSError *error = nil;
  
      NSLog(@"%hhd", [self.xmppStream isConnected]);
  
      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];
      }
  
      XMPPPresence *presence = [XMPPPresence presence];
      NSXMLElement *priority = [NSXMLElement elementWithName:@"priority" numberValue:[NSNumber numberWithInt:127]];
      [presence addChild:priority];
  
      [self.xmppStream sendElement:presence];
  }
  </code></pre>
  
  <p>Any ideas?</p>