Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

XCode 5.0.2 will not sign my app

I'm building an app for Mac App Store submission. I have a valid Team selected in "General", and in Build Settings "Mac Developer" is selected for the code signing identity. Code Signing Provisioning Profile is set to "Mac Team Provisioning Profile: <the app id>".


When I build, there are no errors.


When I attempt to run the app from finder, in Console I get an "unsigned app" error.

The same thing happens when I use the choose the Distribution profile for the app.


I do have two signed, embedded Frameworks, but they are signed with a different signature.


Should I be signing everything with the same signiture? If so, is it possible to have XCode do this automatically?


Exactly what profiles/signatures/whosits/whatsits do I need to sign my app with?



All this stuff seems to change with every XCode/OS version change and is very confusing. I've been writing Mac applications since 1989, and iOS apps for 5 years, so I'm not a complete idiot. But I sure feel like one!


Can someone make sense of this?

OS X Mavericks (10.9), XCode 5.0.2

Posted on Nov 19, 2013 6:55 AM

Reply
11 replies

Nov 19, 2013 7:25 AM in response to Stele

Everything has to be signed with the same signature. Xcode5 can be picky about identiries. If you choose the automatic "Mac Developer", it sometimes (usually) doesn't pick the correct one.


Unfortunately, the only way around this is to submit a lot of apps. If you only submit an app every six months, you either forget how to do it or Xcode changes everything and you have to re-learn. There is no magic bullet. It is just really confusing.


In many ways, the original process was better. It was really difficult, but it was so difficult that Apple had to provide step-by-step instructions or else no one could figure it out. Now you need Xcode integration and hopefully it doesn't scramble and/or dup your certificates. You need provisioning profiles, or not. You need a developer certificate, or installer, or distributor, or 3rd party developer/distributor - whichever is apprpriate. Xcode will conveniently re-set all those values each time you open the project. Everything has to be signed, but not the way you used to do it. Xcode can conviently do it for you, as long as everything is in Xcode and is exactly set up in the specific way Xode needs so that Xcode can conveniently do it for you.


Stele wrote:


Can someone make sense of this?

On second though. Perhaps not. 🙂

Nov 19, 2013 12:02 PM in response to Stele

It is difficult to tell, because Xcode does reset everything, but your Code Signing Identity should be set to one of your "Identities in Keychain" - "Mac Developer: Whoever you are DSD799ss".


Anything in the bundle needs to be signed with the same identity.


Unless you are doing something that needs a Provisioning Profile, leave that "None".

Nov 19, 2013 12:37 PM in response to etresoft

My Code Signing Identity is set to "Mac Developer".

Other Code Signing Flags is "--deep"

And I switched my Provisioning Profile to "None".

But in all cases, after building, when I run the app the Console says:

storeagent: Unsigned app


I looked inside the app and it does have a _CodeSignature folder and embedded.provisionprofile inside it - so it does appear to be signed.


What about it doesn't "storeagent" like?

Nov 19, 2013 2:19 PM in response to Stele

Stele wrote:


Hmm - could you elaborate on the "correct" way to add external frameworks?


It is a bit of a long story. Apple wants everyone to use workspaces. You add all of your projects to a workspace and Xcode will magically figure it all out. I still don't understand that in detail and I don't like to jump into things when I'm not confident. I'm just statically linking anything external. It won't be until next year until I get to the project where I need to worry about this.


I do have a Copy Frameworks phase in my Build Phases, but they are not signed.


That is what I have been doing in the past. You have to add a build phase to sign them. On the project where I have been playing around with this, I already had a separate buidl phrase to run install_name_tool to fix up the dynamic library paths. The "workspace magic" I mentioned above is supposed to eliminate both of these steps.


If I were to manually sign them, which codesign signature should I use?


The same one you sign the rest of your code with.

Nov 20, 2013 7:13 AM in response to etresoft

So here is the confusing thing. After deleting all my old certificates I let XCode generate new ones as intended.


On the Mac Certificates site, I see a <Company Name>: Mac App Distribution cert. But I don't have this cert in my keychain.


Keychain only has these:


Mac Developer: My Name

Developer ID Installer: Company Name

Developer ID Certificate Authority

Apple Worldwide Developer Relations Certification Authority

3rd Party Mac Developer Installer: Company Name

3rd Party Mac Developer Application: Company Name

(the private key for this one says "Mac App Submission: Company Name)


So nothing that specifically matches what I would consider to be Distribution.


Taking your advice, I tried to manually codesign my frameworks, I get this error from codesign:

<Cert Name>: no identity found


It seems there is stuff missing.

Nov 20, 2013 8:01 AM in response to Stele

The only thing I have different is Developer ID Application: yada yada yada


However, all of mine are in my individual name. I don't have a company account (any more). Why would you have all of those certificates in a company name and one in your own name?


Maybe look at those certificates on the web site and double check. Then download and install them manually. I don't really trust Xcode with those things anyway after it created a duplicate Developer ID which cannot ever be deleted.

XCode 5.0.2 will not sign my app

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.