0

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

2 Answers2

1

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.

Michael Dautermann
  • 88,797
  • 17
  • 166
  • 215
  • Just want to be sure I'm reading this right. You say don't use --deep, but instead sign the jdk, and then my app, presumably in two separate command line steps? If it works I'll be overjoyed (not to mention grateful). – Jedi Grunge Apr 21 '15 at 02:57
  • I'm thinking to try `-deep` to start with and if that works, then try the second approach. – Michael Dautermann Apr 21 '15 at 03:17
0

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