Getting "code object is not signed at all In architecture: x86_64" errors when submitting app

When submitting our Java based "jAlbum" app to the App Store we eventually receive this error message from Apple. I've been adviced to ask for help here (getting only admistrative support via Apple):


Dear Developer,

We identified one or more issues with a recent delivery for your app, "jAlbum" 19.1 (19.1). Please correct the following issues, then upload again.

ITMS-90238: Invalid Signature - The executable at path jAlbum.app/Contents/Java/lib/libjcocoa.dylib has following signing error(s): code object is not signed at all In architecture: x86_64 . Refer to the Code Signing and Application Sandboxing Guide at http://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/AboutCS/AboutCS.htmland Technical Note 2206 at https://developer.apple.com/library/mac/technotes/tn2206/_index.html for more information.

ITMS-90238: Invalid Signature - The executable at path jAlbum.app/Contents/runtime/Contents/Home/lib/libawt.dylib has following signing error(s): code object is not signed at all In architecture: x86_64 . Refer to the Code Signing and Application Sandboxing Guide at http://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/AboutCS/AboutCS.htmland Technical Note 2206 at https://developer.apple.com/library/mac/technotes/tn2206/_index.html for more information.

ITMS-90238: Invalid Signature - The executable at path jAlbum.app/Contents/runtime/Contents/Home/lib/libawt_lwawt.dylib has following signing error(s): code object is not signed at all In architecture: x86_64 . Refer to the Code Signing and Application Sandboxing Guide at http://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/AboutCS/AboutCS.htmland Technical Note 2206 at https://developer.apple.com/library/mac/technotes/tn2206/_index.html for more information.

ITMS-90238: Invalid Signature - The executable at path jAlbum.app/Contents/runtime/Contents/Home/lib/libdecora_sse.dylib has following signing error(s): code object is not signed at all In architecture: x86_64 . Refer to the Code Signing and Application Sandboxing Guide at http://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/AboutCS/AboutCS.htmland Technical Note 2206 at https://developer.apple.com/library/mac/technotes/tn2206/_index.html for more information.

... (and so on. 42 such errors in total)


What's wrong here? I don't really know how to tweak our usage of codesign to comply with this. I'm signing the code using Apple's codesign command line tool with the "Developer Application" and "Developer Installer" certs downloaded from Apple's developer center. Being a Java app we're bundling Oracle's OpenJRE and we're not developing using XCode. All code signing and package preparation is done using Apple's command line tools.


Here's how we sign and package this app:


codesign -a x86_64 --entitlements Entitlements.plist -s "3rd Party Mac Developer Application: Jalbum AB" -f jAlbum.app/Contents/runtime/Contents/Home/bin/java

codesign -a x86_64 --entitlements Entitlements.plist -s "3rd Party Mac Developer Application: Jalbum AB" -f jAlbum.app/Contents/runtime/Contents/Home/bin/jjs

codesign -a x86_64 --entitlements Entitlements.plist -s "3rd Party Mac Developer Application: Jalbum AB" -f jAlbum.app/Contents/runtime/Contents/Home/bin/jrunscript

codesign -a x86_64 --entitlements Entitlements.plist -s "3rd Party Mac Developer Application: Jalbum AB" -f jAlbum.app/Contents/runtime/Contents/Home/bin/keytool

codesign -a x86_64 --entitlements Entitlements.plist -s "3rd Party Mac Developer Application: Jalbum AB" -f jAlbum.app/Contents/runtime/Contents/Home/lib/jspawnhelper


codesign --deep -a x86_64 -s "3rd Party Mac Developer Application: Jalbum AB" -f jAlbum.app/Contents/runtime/

codesign -a x86_64 -s "3rd Party Mac Developer Application: Jalbum AB" -f jAlbum.app/Contents/MacOS/libapplauncher.dylib


codesign -a x86_64 --entitlements Entitlements.plist -s "3rd Party Mac Developer Application: Jalbum AB" -f jAlbum.app

echo "Creating pkg"

productbuild --sign "3rd Party Mac Developer Installer: Jalbum AB (TQ748SBU4V)" --component jAlbum.app /Applications jAlbum.pkg


What are we doing wrong?

Replies

???


You aren’t signing all of your code. That’s what’s wrong. Did you review any of those links? Apple does not recommend the use of —deep when signing.