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.
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:
unknown install[20867] <Error>: entitlement 'application-identifier' has value not permitted by a provisioning profile
This error is displayed a few times at the beginning, and there is also a:
No valid 'aps-environment' entitlement string found for application 'appname:(null). Notifications will not be delivered.
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.
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.
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.
Does anyone have any idea on what the problem could be?
Many thanks in advance.
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.
First the entitlements format changed, then it became auto generated when archiving an application. Delete the entitlements file altogether and remove any references to it in the build settings.