title: iOS and push notifications-does not work in Xcode environment
body: <p>I'm not sure that title is clear. What's happening is that I have been working on the Push Notifications feature for my enterprise app. It has been working fine in the development environment, but I have migrated to the distribution version, and it works fine on the iPhone <em>if</em> the app is downloaded from the archived .IPA file on the server, but <em>not</em> if it is running from the directly installed version from Xcode. (i.e. through the iPhone connected to the Mac via USB.) And even if I stop the test run, disconnect from the Mac, and run the app as it is installed directly from Xcode, PNs do not come through. It's only if I reinstall the app from the server. Very strange.</p>
  
  <p>I have all certificates properly created and installed, which shouldn't matter, I'd think.</p>
  
  <p>Anyone have a clue why it's like this?</p>
  
  <p>Thanks!</p>
  
  <p>EDIT: Additional info: Same problem if I load it either way on the iPad. OK if downloaded, not if directly installed.</p>
  
  <p>Edit 2: I figured it out. See my answer below.</p>