title: How do I make push notifications work in production for iOS?
body: <p>I didn't realize this until after I submitted my app to the App Store (and its now available) that there was a difference between a distribution and production token. During development, push notification worked for me, but after downloading it from the App Store, it didn't work.</p>
  
  <p>I have push notifications enabled for development and distribution. I have created the appropriate development and distribution provisioning profile with push notifications enabled.</p>
  
  <p>Some questions that I have is:</p>
  
  <p>Is there anything I can do in my .php file, now that the app is in the app store, to allow push notification without submitting another update, i.e. changing the APNS server location from development to production?</p>
  
  <p>Do I have to change how I fetch token within AppDelegate.m? Right now I have this within <code>didRegisterForRemoteNotificationsWithDeviceToken</code>:</p>
  
  <pre><code>NSString *token = [ [deviceToken description] stringByTrimmingCharactersInSet: [NSCharacterSet characterSetWithCharactersInString:@"&lt;&gt;"] ];
  
  // Remove spaces from the token
  token = [token stringByReplacingOccurrencesOfString:@" " withString:@""];
  </code></pre>
  
  <p>How can I test the production mode in Xcode? I have already created an Ad-Hoc certificate.</p>
  
  <p>Thanks</p>