1

I'm trying to sign my JWrapper OSX App following these instructions: http://www.jwrapper.com/guide-code-signing.html

I created a Developer ID, exported the 3 certificates, and created a P12 store. But I'm not sure which ID I'm supposed to give here:

<DeveloperIdAlias>your developer ID (typically 'developers name dev key')</DeveloperIdAlias>

Which ID is this exactly and where can I find it? I tried everything I could find (my name, Apple ID, user ID key, 'organizational unit' key, another 10-digit key that appears besides my name when I click on my mac developer certificate in keychain)... In each case, I get this error:

[MacOS] Signing OSX App
**********************************
*          BUILD FAILED          *
**********************************
** Error Trace:

utils.buildtools.common.signing.KeyStoreDetails$NoSuchAliasException: Unable to find alias 'KL596QNCVZ'
    at utils.buildtools.common.signing.KeyStoreDetails.loadKeyStore(KeyStoreDetails.java:88)
    at utils.buildtools.common.signing.KeyStoreDetails.<init>(KeyStoreDetails.java:40)
    at utils.buildtools.osx.signer.MacSigner.initialiseCertificate(MacSigner.java:639)
    at utils.buildtools.osx.signer.MacSigner.signApp(MacSigner.java:794)
    at jwrapper.JWrapperCompiler.main(JWrapperCompiler.java:2468)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at SecureRunner2.<init>(SecureRunner2.java:452)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at SecureRunner1.<init>(SecureRunner1.java:422)
    at SecureRunner1.<init>(SecureRunner1.java:227)
    at SecureRunner1.main(SecureRunner1.java:52)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at jwrapper.launch.JWCompiler.main(JWCompiler.java:112)
** Reason: utils.buildtools.common.signing.KeyStoreDetails$NoSuchAliasException: Unable to find alias 'KL596QNCVZ'

EDIT: I had put the certificates and the p12 in a directory and provided the paths as required. Note that the key provided for the developer ID alias is the one that appears in the error message, and as mentioned above, I tried a bunch of different things for this field but always get the same error:

<SignForMac>
  <AppleRootCertificate>../Certificates/AppleIncRootCertificate.cer</AppleRootCertificate>
  <DeveloperIdCertificate>../Certificates/DeveloperIDCA.cer</DeveloperIdCertificate>
  <DeveloperIdP12>../Certificates/certificates.p12</DeveloperIdP12>
  <DeveloperIdAlias>KL596QNCVZ</DeveloperIdAlias>
  <DeveloperIdPassword> ... </DeveloperIdPassword>
</SignForMac>

Thanks,

Daniel

1 Answers1

1

It looks like you need to have your .cer and .p12 files on disk somewhere (e.g. in a "Certificates" folder) and not just in the Keychain.

And then your XML configuration file will have entries that look like this:

<SignForMac>
        <AppleRootCertificate>/Path/To/Certificates/AppleIncRootCertificate.cer</AppleRootCertificate>
        <DeveloperIdCertificate>/Path/To/Certificates/DeveloperIDCA.cer</DeveloperIdCertificate>
        <DeveloperIdP12>/Path/To/Certificates/DeveloperID.p12</DeveloperIdP12>
        <DeveloperIdAlias>my company dev key</DeveloperIdAlias>
        <DeveloperIdPassword>BlahBlahBlahBlah</DeveloperIdPassword>
</SignForMac>
Michael Dautermann
  • 88,797
  • 17
  • 166
  • 215
  • Thanks for your answer. Yes, I had followed the instructions on the page that I indicated and included the certificates as you mentioned. From the error, it seems to me the problem is the DeveloperIdAlias and not the certificates? – user2828224 Oct 27 '15 at 21:18
  • My problem is: I don't know what to insert for – user2828224 Oct 27 '15 at 21:34
  • Look at the name of the certificate in your keychain. For me, I see "Developer ID Application: Michael Dautermann". Try that and see what happens. – Michael Dautermann Oct 27 '15 at 21:52
  • Personally I tried that and it's not working. I tried different combinations without any luck. As always, Mac developers don't get much help... – Nicolas Dion-Bouchard Apr 09 '20 at 13:37