user1744056
user1744056

Reputation:

Code Sign error: The identity 'iPhone Distribution:' doesn't match any valid, non-expired certificate/private key pair.. Any solutions?

I'm in the process of writing and deployment of my first iOS application. When I tried to build release build (flavour) of my project for real iOS device (I select Release in project schema and choose Products->Archive). I got an error as in the question title. Trying googling I found that it's a very popular error and only on stackoverflow there are nearly four threads for it. But trying to follow advices listed there changed nothing. I tried to change certificate keys preferences (code signing identity) in the Targets->Build Settings in different ways. I also tried to change them directly via xcodebuild. Eventualy, I've tried all the combinations (developer/distribution). May be this settings even don't relate to this problem - i don't know. So the question is there some exact solution for this problem?

Upvotes: 2

Views: 4975

Answers (3)

Terry Thorsen
Terry Thorsen

Reputation: 301

Found another esoteric thing that needs to be checked if you're still getting this error after having tried everything. Make sure the code signing selections under TARGETS->Build Settings isn't overriding what you've set for code signing in PROJECT->Build Settings.

Upvotes: 1

Vins
Vins

Reputation: 1

This error came up for me because I did not have scheme setup in debug mode.

  1. Option Click on the run button pops upa window in which you should be selecting 'Debug' for "Build Configuration".

Upvotes: 0

Adrian P
Adrian P

Reputation: 6529

I had the same issue when I upgraded to xcode 4.5 iOS 6. Just go to organizer and select profiles and when you see your distribution click on it and remove it. Then try to refresh. It will connect to developer site and download your current distribution profile. Then when trying to choose your profile in your project you can see the new set of profiles which will work. Just make sure your distribution profile is current. That should so it. Adrian

Upvotes: 2

Related Questions