title: Entitlement 'application-identifier' has value not permitted by a provisioning profile
body: <p>I have been given a project which was released 2+ years ago, and had been developed by a third party who is no longer affiliated with us.
  I am running it in xcode4.2 using iOS5.0 sdk, and have already built a few other apps using these without any problems. This project's deployment target is set to 3.2.1 as it is an older project and in theory should still work on older devices.</p>
  
  <p>This project runs fine in the simulator, but not on a device. It starts up, loads the splash screen, and while loading other assets it crashes with no error dispayed in xcode. Using the device console in the organizer, I have noticed that it displays the error:</p>
  
  <pre><code>unknown install[20867] &lt;Error&gt;: entitlement 'application-identifier' has value not permitted by a provisioning profile
  </code></pre>
  
  <p>This error is displayed a few times at the beginning, and there is also a:</p>
  
  <pre><code>No valid 'aps-environment' entitlement string found for application 'appname:(null). Notifications will not be delivered.
  </code></pre>
  
  <p>I've created a new provisioning profile with push services enabled, and done all of the certificate stuff to go with it - I suspect this error is a follow on from the first error but I'm not sure. Previously when I had this problem it was because I was mistakingly building against a prov profile without push notifications configured - switching to the correct profile fixed this.</p>
  
  <p>What's confusing is that I've tried removing the prov profile, restarting xcode, the mac and the device  - problem persists.
  I've made sure that the bundle identifier in the plist matches the one used on the provisioning profile.
  I'm unsure whether I need to change anything in the Entitlements.plist, previous applications I've made didn't have this file in it (I'm led to believe the requirement was removed in xcode 4?). At the moment the only line in that plist is "can be debugged", which I have tried as both true and false - neither have worked.</p>
  
  <p>I've looked up previous questions on here, but have had no luck. If there was a problem with the provisioning profile I wouldn't even expect it to build, let alone display the splash screen.</p>
  
  <p>Does anyone have any idea on what the problem could be?</p>
  
  <p>Many thanks in advance.</p>
  
  <p>Edit: in case it's relevant the device I am using is a 3GS, on iOS 5.0. The crash happens regardless of whether I run directly from xcode, or archive the app is an ipa and copy it to the device.</p>