Duplicate Code Signing on Xcode with Any iOS SDK

Working with Xcode code signing is a pain. You may have encountered a situation where there are more than two code signing identity’s in Xcode. This means that you potentially have to change four different code signing settings to update your app, rather than just two.

I think this is cruft from upgrading to the newest Xcode version or something. Here’s what it looks like and here’s how to fix it. It’s very annoying when developing and testing with adhoc and app store builds.


Code signing in Xcode 4


The issue is visible with the “Any iOS SDK” seen as a subitem to the Debug and the Release builds. Things won’t work correctly if the two don’t match in my experience. So I end up having to change two at a time.


You can close Xcode or keep it open. It seems to work either way before you start the next steps.

1.Open your project folder in finder. (Right click project in Xcode and choose “Show in Finder”)

Show in finder

2. Right click on the Xcode project file in Finder -> “Show Package Contents”

Xcode project Show package contents

3. Right click on the project.pbxproj and choose “Open With” -> “TextEdit”

Xcode project in Textedit

4. Search for “Sign” and delete any lines that look like the following. Xcode will regenerate, so don’t worry about deleting them. I believe the first two are the root of the problem.

“CODE_SIGN_IDENTITY[sdk=iphoneos*]” = “iPhone Developer”;

“CODE_SIGN_IDENTITY[sdk=iphoneos*]” = “iPhone Developer”;

CODE_SIGN_IDENTITY = “iPhone Developer”;

Textedit code sign identity

5. Open the project settings in Xcode and see the duplicate “Any iOS SDK” are removed and Xcode regenerated the default Code Sign Identities.

Fixed code sign duplicates

6. Update with your credentials for Debug/Release.

Update code sign


Published by

Paul Solt

I'm a computer programmer, frisbee fanatic, and a cook. Currently I'm at RIT studying computer science.

6 thoughts on “Duplicate Code Signing on Xcode with Any iOS SDK”

  1. Brilliant. I’ve had this problem ever since the first ever app I built back in 2009 – thanks for sorting it out!

  2. Hi Ben,

    Me too! It’s been so frustrating and I was having issues with it, that one day I removed everything code sign related. I know I’m not the only one.

  3. Thanks for sharing. It helps a lot !!

    Just curious how you figure it out. xcodeproj is a holy place to me, there is no official doc to explain the content of the file..

  4. Wow, brilliant. Thank you. :-) I had six of those buggers, confusing the hell out of me. Now it all makes sense again. Best of all, I didn’t need to quit the project and restart XCode. Great job!

  5. Phillip, I found an easier way, click on your project settings (not target). You can press delete key or the minus button on any of the Code Signing lines that are extra.

Leave a Reply

Your email address will not be published. Required fields are marked *