title: iPhone SDK Push Notification
body: <p>I have setup push notifications in the apple developer panel and added the code to my application.</p>
  
  <p>It works fine on the phone using a development profile but if I use a distribution (ad-hoc) profile so that I can give it to a few users for testing it gives an error and crashes, the log gives the following error</p>
  
  <p>Code:</p>
  
  <pre><code>Thu Jun 25 22:22:35 unknown SpringBoard[729] &lt;Warning&gt;: *** Assertion failure in -[SBRemoteNotificationServer registerApplication:forEnvironment:withTypes:], /SourceCache/SpringBoard/SpringBoard-919.5/SBRemoteNotificationServer.m:633
  Thu Jun 25 22:22:35 unknown SpringBoard[729] &lt;Error&gt;: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'no connection found for environment production'
  </code></pre>
  
  <p>I am using the following code in the app</p>
  
  <p>Code:</p>
  
  <pre><code>[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)];
  </code></pre>
  
  <p>The thing I don't understand is why it works perfectly using a development profile but with ad-hoc it crashes.</p>
  
  <p>Does anyone know what would cause this?, I've tried changing lots of things to try and find the issue but have found nothing. </p>