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.

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.
Solution
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”)

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

3. Right click on the project.pbxproj and choose “Open With” -> “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”;

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

6. Update with your credentials for Debug/Release.

Enjoy.
6 Responses to Duplicate Code Signing on Xcode with Any iOS SDK
Leave a Reply Cancel reply
Kickstarter
Artwork Evolution
Facebook
@PaulSolt
- No public Twitter messages.
Github
Tags
Apple application testing App Store Artwork Evolution Boost bundle C++ cross platform development Dual Monitors Facebook Gears of War 2 gestures git GLUT iOS iPad iPhone iphone dev iphone dev 101 logic testing Mac Macbook Pro Mac OS X mac osx NSDocument Objective-C OCUnit OpenGL player/stage presentation programming remote control resource paths RIT SCM skillshare slides tdd testable code testing unit testing Xbox 360 Xcode xcode 4







Brilliant. I’ve had this problem ever since the first ever app I built back in 2009 – thanks for sorting it out!
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.
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..
Guess and check. I got frustrated with it and starting hacking it apart.
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!
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.