title: Provisioning Profiles + Push Notifications + Production vs Development
body: <p>I'm building an iOS app that uses push notifications, and I'm finally ready to submit it. Before I do, I'd like to test out push notifications off the Production server, to make sure everything is working correctly. Thus far, the sandbox environment has been working fine.</p>
  
  <p>After doing quite a bit of searching, I learned that switching the servers over from <code>ssl://gateway.sandbox.push.apple.com:2195</code> to <code>ssl://gateway.push.apple.com:2195</code> wasn't enough, and that production push tokens are different from sandbox push tokens. Instead, apparently I need a new provisioning profile with Production entitlements, new certs installed on my server, and to re-build my app with said profile so that it knows to create the correct push tokens.</p>
  
  <p>So, after going through all the steps, I can't even make a build run on my phone; XCode says </p>
  
  <blockquote>
    <p>This profile cannot be installed on devices</p>
  </blockquote>
  
  <p>Here are the steps I've taken. If I'm missing something please let me know:</p>
  
  <ul>
  <li><p>In my iOS Developer Center, I've made sure that my AppID is "enabled for production" under the Apple Push Notification Service.</p></li>
  <li><p>Also in my iOS Developer Center, I've created my Production Push SSL Certificate, gone through the necessary conversion steps, and installed the resulting .pem on my server.</p></li>
  <li><p>Per the instructions, I've create "a new provisioning profile containing the App ID you wish to use for notifications."  I've done this by going to Provisioning, and clicking on the "Distribution" tab, and making a new profile. I've confirmed that "production" is set under the "entitlements" section of this profile.</p></li>
  <li><p>I've selected the provisioning profile in my project settings. I get the message </p>
  
  <blockquote>
    <p>This profile cannot be installed on devices</p>
  </blockquote>
  
  <p>and I'm stuck.</p></li>
  </ul>