"(Java)App is damaged and can't be opened. You should move it to the Trash."

Joshua Smith jesmith at kaon.com
Thu May 23 11:39:01 PDT 2013


You need to sign the .app

My build script includes a line like this:

  export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/usr/bin/codesign_allocate"
  codesign -f -s "Developer ID Application: Kaon Interactive Inc." -v mesonInst.app

You'll need to do something similar.

You need to be a registered Apple developer to get the certificates that codesign needs.

On May 23, 2013, at 2:18 PM, Jörn Huxhorn <jhuxhorn at googlemail.com> wrote:

> Is there any way to circumvent this strange situation described at http://lilithapp.com/osx.html (this is my own app).
> 
> The exact same thing does also happen with other Java apps, e.g. Minecraft, TV-Browser or jEdit.
> 
> My complaint is that it's not the usual "XYZ is from an unidentified developer" message but the misleading "XYZ is damaged". This does also prevent the user from starting it anyway using Alt-Open.
> 
> I read the corresponding article at http://support.apple.com/kb/HT5290 but that doesn't really provide any clue.
> 
> I also did quite a bit of searching beside that but other than the workaround I described in the link above (disable Gatekeeper, start app, re-enable Gatekeeper) no one seems to have a real fix.
> 
> So this list is pretty much my last resort. Do you have any idea?
> 
> This is the output of some otool for some of the JavaApplicationStub versions in use:
> 
> ############################################################
> otool -L /Applications/Lilith.app/Contents/MacOS/JavaApplicationStub
> /Applications/Lilith.app/Contents/MacOS/JavaApplicationStub (architecture ppc):
> 	/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions/A/JavaApplicationLauncher (compatibility version 1.0.0, current version 1.0.0)
> 	/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 676.0.0)
> 	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.0)
> 	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 476.0.0)
> /Applications/Lilith.app/Contents/MacOS/JavaApplicationStub (architecture i386):
> 	/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions/A/JavaApplicationLauncher (compatibility version 1.0.0, current version 1.0.0)
> 	/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 676.0.0)
> 	/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
> 	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.0)
> 	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 476.0.0)
> ############################################################
> otool -L /Applications/Minecraft.app/Contents/MacOS/JavaApplicationStub
> /Applications/Minecraft.app/Contents/MacOS/JavaApplicationStub:
> 	/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions/A/JavaApplicationLauncher (compatibility version 1.0.0, current version 1.0.0)
> 	/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 751.42.0)
> 	/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 103.0.0)
> 	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.1)
> 	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 550.42.0)
> ############################################################
> otool -L /Applications/muCommander.app/Contents/MacOS/JavaApplicationStub
> /Applications/muCommander.app/Contents/MacOS/JavaApplicationStub:
> 	/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions/A/JavaApplicationLauncher (compatibility version 1.0.0, current version 1.0.0)
> 	/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 751.0.0)
> 	/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 103.0.0)
> 	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0)
> 	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 550.0.0)
> ############################################################
> otool -L /Applications/TV-Browser.app/Contents/MacOS/JavaApplicationStub
> /Applications/TV-Browser.app/Contents/MacOS/JavaApplicationStub:
> 	/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions/A/JavaApplicationLauncher (compatibility version 1.0.0, current version 1.0.0)
> 	/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 833.1.0)
> 	/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1105.0.0)
> 	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.0.0)
> 	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 635.0.0)
> ############################################################
> otool -L /System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/MacOS/JavaApplicationStub
> /System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/MacOS/JavaApplicationStub:
> 	/System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/Versions/A/JavaApplicationLauncher (compatibility version 1.0.0, current version 1.0.0)
> 	/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 833.1.0)
> 	/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1105.0.0)
> 	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.0.0)
> 	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 635.0.0)
> ############################################################
> 
> Yes, Lilith is using a pretty old universal executable but the same issue also happens with the TV-Browser that is seemingly using the latest version.
> 
> Cheers,
> Jörn.



More information about the macosx-port-dev mailing list