views:

201

answers:

4

I'm getting the following error when trying to submit my app to the app store. I went through the initial provisioning process and am able to run the app on my phone so not sure what's wrong.

Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate.

EDIT: I tried downloading and installing a Distribution profile, but I'm still getting the error. Is there some way I need to link this new profile to my app in XCode? Thanks!

EDIT 2: I've now gotten a distribution provisioning profile from Apple and tried compiling with this. Getting the error "A valid provisioning profile for this executable was not found."

A: 

Are you sure you provisioning profile is a distribution profile for app store and not a development/ad-hoc one??

lukya
I just downloaded and installed a Distribution profile, but I'm still getting the error. Is there some way I need to link this new profile to my app in XCode?Thanks!
Ian Silber
+1  A: 

You can either double click a .mobileprovision file, or manually copy it to ~/Library/MobileDevice/Provisioning Profiles. Then it will show up inside the provisioning popup in your Target settings.

Ben Gottlieb
where do I find the .mobileprovision file?
Ian Silber
Ok, got a mobileprovision file from Apple. Now when I try to compile I get: "A valid provisioning profile for this executable was not found." and the build fails. Any ideas?
Ian Silber
+3  A: 

Verify the following:

  • When creating the distibution profile, make sure that Distribution Method is "App Store".
  • In project settings, go to Build tab and make sure Code Signing Identity is the distribution profile you created for the App Store
  • In Target settings (double-click on Target in your project), go to Build tab and make sure Code Signing Identity is the distribution profile you created for the App Store

It's recommended that you have a configuration in your project settings for AdHoc and App Store builds. I've found it makes life easier when it comes time to deploy.

keno
This is the right answer, but to put a finer point on it... when building for distribution, make sure you use the "iPhone Distribution" setting in the project settings for the provisioning profile, which is different from the "iPhone Development" one. Thus, having two separate configurations is recommended. (I generally have "Simulator", "Device", "AdHoc", and "Deployment".)
samkass
A: 

Set the provisioning profile for both Project and Active Target.

Click Project -> Edit Project Settings change the code signing entity Click Project ->Edit Active Target and change the same code signing entity here as well.

You should be good to go.!

Mugunth Kumar
No need to do it on target, target inherits the project settings.
bstahlhood