1

我正在尝试按照以下说明签署我的 JWrapper OSX 应用程序: http ://www.jwrapper.com/guide-code-signing.html

我创建了一个 Developer ID,导出了 3 个证书,并创建了一个 P12 商店。但我不确定我应该在这里提供哪个 ID:

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

这到底是哪个 ID,我在哪里可以找到它?我尝试了所有我能找到的东西(我的名字、Apple ID、用户 ID 密钥、“组织单位”密钥、当我点击钥匙串中的 mac 开发人员证书时,我的名字旁边出现的另一个 10 位密钥)......在每种情况下,我得到这个错误:

[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'

编辑:我已将证书和 p12 放在一个目录中,并根据需要提供了路径。请注意,为开发人员 ID 别名提供的密钥是出现在错误消息中的密钥,如上所述,我为该字段尝试了一堆不同的东西,但总是得到相同的错误:

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

谢谢,

丹尼尔

4

1 回答 1

1

看起来你需要将你的.cer.p12文件放在磁盘上的某个地方(例如在“ Certificates”文件夹中),而不仅仅是在钥匙串中。

然后您的 XML 配置文件将包含如下所示的条目:

<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>
于 2015-10-27T02:17:40.640 回答