views:

1555

answers:

2

Hi!

I am about to publish my first free app on the appstore. Following the instruction on the developer portal, I have added an "Entitlements.plist" file, and referenced this file in the "code signing entitlements" project setting. After I did this I can no longer test the app on my Ipod, with this error message "Executable was signed with invalid entitlements". If I remove the reference to the entitlements file, everything works fine.

I have already done this: - re-downloaded my provisioning profile and installed it in organizer - Tried making a new provisioning profile and installed that - unchecked "get-task-allow" in the plist-file. - Tried "clean all targets"

Can any of you shed any light on this one? Is this critical when publishing to the appstore? I have my distribution profile ready, but I suppose I have to solve this isssue first. I am thankful for any thoughts on this matter!

A: 

If your company (or homepage anyway) is called for example stackoverflow.com, then it's good practice to have your app identifier: com.stackoverflow.myAppName. And You generic app identifier in your certificate should be *com.stackoverflow.**. This has to be defined in the iPhone dev centre. And then make sure to edit your app's bundle identifier in the Info.plist to reflect those changes. After you do that you can test on a device and also publish for the AppStore.

Dimitris
Thanks using your time on this, Dmitris. I still cant work it out though... I am trying to do as you say, but i dont understand what you mean when you say "And You generic app identifier in your certificate should be *com.stackoverflow.**.". How do I change my certificate? Do i have to revoke it and make a new one? And then download, install in keychain, etc? Sorry for being a bit slow, man...
Ezop
If you go to the Dev Centre, to "App IDs" what does the description of the app id there read? It should read something like EUYT765TR.com.youDomain.*
Dimitris
I have two now. My old one reads "ZQ75CFNP3G.*" and on line two "espentokerud". After reading your advice i made a new App ID, which is also shown. The description is "ZQ75CFNP3G.com.espentokerud.mittSnitt" and on line two "mittSnittAppID".
Ezop
I think i got it now. I used my new appID, the one with "ZQ75CFNP3G.com.espentokerud.mittSnitt", that is without a wildcard. In the info.plist I set "com.espentokerud.plist" for a bundle identifier. To be sure i continued using the entitlement.plist, just to get the error messages. Now that they arent coming anymore, ill take it away again. Note to others: in order to use the entitlements.plist on a local device you have to set the get-task-allow to true(checked) temporarily. Thanks for again helping me out, Dimitris!
Ezop
Np :) Good luck with the approval now
Dimitris
+2  A: 

It sounds like you have accidentally set the project to use the entitlements file instead of just the distribution build. The entitlements file should not be used when compiling against your developer certificate ie for your iPod. It should only be used for distribution.

What you have most likely done is edit the global version of the setting (by double clicking on the project file in the groups and files section) instead of the target version.

Here is how to fix that.

  1. open your project in xcode
  2. under project set the active sdk and the active build configuration to whatever you use for your ipod
  3. open the target tab under groups and files
  4. Double click on the target you are trying to build. Target icons look like an A made out of tools
  5. scroll down to code signing and remove the code signing entitlements
Michelle Six
Thanks! Worked for me.
Blauesocke