I am trying to distribute a Java application to users of OS X. I am not using a Mac store — it must be distributed through my own website. No matter what I try, OS X Gatekeeper rejects the application.
Here is my method:
(1) Build the application as usual, get the JAR file
(2) Use appbundleras described here: https://docs.oracle.com/javase/7/docs/technotes/guides/jweb/packagingAppsForMac.html . This creates an .app around my JAR, which works well and contains the JVM in the directory MyApp.app/Contents/PlugIns.
(3) Log in to the application with my developer certificate:
codesign -s 'Developer ID Application: MyCompany Ltd' --deep MyApp.app
... process completed successfully
(4) Make sure that .app will adhere to Gatekeeper's Iron-Fist laws:
spctl --assess --verbose=4 --type execute MyApp.app
... and the result I will return:
MyApp.app: a sealed resource is missing or invalid
! ? ?
SO/Google " ...", ( ) --force ( , ).