title: How to register user using xmpp/jabber in ios?
body: <p>iPhone Chat app using xmpp/jabber.
  This method i am not able register on server. it gives me "403" error.
  Can anyone help me, how can i create a new account on server using xmpp/jabber in ios?</p>
  
  <p>here my code :</p>
  
  <pre><code> NSString *username = loginField.text;
      NSString *password = passwordField.text;
  
  
      AppDelegate *del = (AppDelegate *)[[UIApplication sharedApplication] delegate];
  
      del.xmppStream.myJID = [XMPPJID jidWithString:username];
  
      NSLog(@"Does supports registration %hhd ",del.xmppStream.supportsInBandRegistration );
  
  
      NSLog(@"Attempting registration for username %@",del.xmppStream.myJID.bare);
  
      if (del.xmppStream.supportsInBandRegistration)
      {
          NSError *error = nil;
  
          if (![del.xmppStream registerWithPassword:password error:&amp;error])
          {
              NSLog(@"Oops, I forgot something: %@", error);
          }
          else
          {
              NSLog(@"No Error");
          }
      }
  </code></pre>
  
  <p>and i got error</p>
  
  <p>ERROR :- </p>
  
  <pre><code>&lt;iq xmlns="jabber:client" from="username@Testlocalhost" to="username@Testlocalhost/40751035661420464079722458" type="error"&gt;
      &lt;query xmlns="jabber:iq:register"&gt;
      &lt;username&gt;newusername&lt;/username&gt;
      &lt;password&gt;userpassword&lt;/password&gt;
      &lt;/query&gt;
      &lt;error code="403" type="auth"&gt;
      &lt;forbidden xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/&gt;
      &lt;/error&gt;
      &lt;/iq&gt;
  </code></pre>