views:

67

answers:

3

I have one project where the code-signing popup is all whacked-out.

On a "normal" (i.e., every-other) project, the popup looks something like "Good menu" in this picture, but on one project, it looks like the "Not-good menu":

Code-sign menus, good and not-good

The "Not-good menu" is from the project about which I'm asking.

I tried quitting & relaunching XCode, but there's no change.

Any ideas what went wrong? Is there some sort of "un-whack my project" tool?

EDIT:

I suspect that the problem is related to the whack-project being not-worked-on for a long time and, hence, missed a "This project created by an older version of XCode" migration. Is there some sort of "update my project files" tool?

EDIT:

On a tip from another forum, I did this:

  • close project in XCode.
  • Open project.pbxproj (in your filename.xcodeproj package) in a text editor. (make a backup first!)
  • Remove all lines starting with "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "blahblah blah Developer";
  • save
  • Quit & relaunch XCode.
  • Reopen project in Xcode.
  • Reset the code signing identity you want

Well, there's good news & bad news.

Good news: It builds, and no code-signing errors. Yay.

Bad news: The popup still looks like the "not-good menu" in my screenshot.

More Bad News: the not-good menu is incomplete so, for example, I can select the client's ad-hoc, but not their app-store (we're sort of hoping to ship the product!)

A: 

You should be able to fix this by removing all certificates in the Organizer and resync with Apple afterwards (Refresh Button).

alt text

Henrik P. Hessel
The problem is project-specific. EVERY OTHER PROJECT (I have dozens) works fine; it's just this one. Wouldn't an organizer-fixable problem be across all projects?
Olie
(...and it didn't work. Deleted all, hit refresh, added client certs back in --> no change.)
Olie
Sorry to hear that, sometimes you can't get around starting a new clean project and add all your old files to it.
Henrik P. Hessel
A: 

Try this:

sed -i .bak "s/\"CODE_SIGN_IDENTITY[sdk=iphoneos*].*/\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";/g" project.pbxproj

Then open/clean/build/pray/makesacrifice

+1  A: 

I appreciate all your help, but none of the proposed solutions worked. I ended up creating a new project and re-building it.

I also duplicated the existing project, stripped out all the code and, as it had the same problem, attached it to the bug I sent to Apple. Hopefully, future XCodes will be better about this.

EDIT: Found the problem. It turns out I had inadvertently set the project's base SDK to simulator x.y, vice iOS x.y. Once I changed that, the codesign menu went back to as-expected.

D'oh!

Olie