Jedi Grunge
Jedi Grunge

Reputation: 27

Unable to sign my app with codesign

I have had great success compiling my Jar to an app, and then making a DMG file to install it on Mac. I am now trying to sign it, but having no luck with % codesign -s

I think my syntax is correct (in this sample I'm obscuring my actual commonname with My Name 0000000000):

codesign -s "Developer ID Application: My Name (0000000000)" XMarker.app

The result is:

XMarker.app: code object is not signed at all In subcomponent: /Users/myname/Desktop/XM-dev/XLIFF2Modules/XMarker.app/Contents/PlugIns/jdk1.8.0_40.jdk

And sure enough if I test it:

codesign -d --verbose=4 XMarker.app XMarker.app: code object is not signed at all

If somebody could tell me what I'm doing wrong I'd appreciated it

Upvotes: 0

Views: 543

Answers (2)

Jedi Grunge
Jedi Grunge

Reputation: 27

Thanks to Michael Dautermann! Your clues set me on the right trail!

Going "--deep" is not the way to go because we still fail the

spctl --assess --type execute XMarker.app test. 

But the second part of his answer lead me to what worked.

So to be sure the precise, isolated answer is available to others suffering this problem, here's what works:

cd /Users/myname/Desktop/XM-dev/XLIFF2Modules/XMarker.app/Contents/PlugIns/

codesign -s "Developer ID Application: My Name (0000000000)" jdk1.8.0_40.jdk


cd /Users/myname/Desktop/XM-dev/XLIFF2Modules

codesign -s "Developer ID Application: My Name (0000000000)" XMarker.app

codesign -d --verbose=4 XMarker.app

[receive affirmation of correctly signed app]

spctl --assess --type execute XMarker.app

[receive no errors which = affirmation that the app will pass]

[the following I have not yet done, but expect success - if not, I will edit this part]

spctl --assess --type install XMarker.dmg

Upvotes: 0

Michael Dautermann
Michael Dautermann

Reputation: 89549

Try going "--deep".

That is:

codesign --deep -s "Developer ID Application: My Name (0000000000)" XMarker.app

Apple recommends against doing "--deep" for production releases, preferring instead to sign individual components (e.g. "jdk1.8.0_40.jdk") before embedding them into your final app.

Upvotes: 1

Related Questions