我已经解决了我的公证问题。我不知道这是否是“正确的方式”,但它奏效了,所以下面是我所做的,也许它会帮别人节省我经历的时间和挫折。
背景:
我是一名承包商,在客户的Apple Developer帐户上拥有“管理员”权限,同时拥有个人ADC帐户。正如我在问题中指出的那样
Electron Builder
文档说明需要一个“特定于应用程序的密码”,并链接到一个关于如何生成密码的苹果文档。然而,该链接是或似乎是关于生成一个特定的密码,以便与第三方应用程序(如“Twitter”)一起使用,从而保护个人的Apple ID密码。至少我是这么看的。在我的个人ADC帐户或团队帐户中,无法生成这样的密码。所以我在我的个人帐户中生成了一个密码。
这篇文章来自
Electron Builder issues
引入了要传递给的附加属性
notarize
:ProviderShortname。如帖子所述,可以通过以下方式访问:
xcrun altool --list-providers -u <personal APPLE ID> -p <app-specific pw generated within that acct>
这是一个会员名单。然后,我在下面的代码中将团队ID用作“ascProvider”的值:
require('dotenv').config();
const { notarize } = require('electron-notarize');
exports.default = async function notarizing(context) {
const { electronPlatformName, appOutDir } = context;
if (electronPlatformName !== 'darwin') {
return;
}
const appName = context.packager.appInfo.productFilename;
return await notarize({
appBundleId: 'com.xxx.yyy.zzz',
appPath: `${appOutDir}/${appName}.app`,
appleId: process.env.APPLEID,
appleIdPassword: process.env.APPLEIDPASS,
ascProvider: process.env.ASCPROVIDER
});
};
该应用程序已成功公证(苹果公司发送了一封确认电子邮件),其余包装继续进行。我在创建
dmg
在公证收据“装订”到应用程序之后(在我尝试公证应用程序之前没有发生)。这些问题与缺少必需的“message”和“lang”代码(在我的例子中是“en-us”)有关。我通过添加“Electron Builder”提供的示例解决了这个问题,如下所示。
同样,我不知道这是否是处理所有这些问题的“正确方法”,但它奏效了。我想,如果一个人是一个单独的开发人员,而不是团队的一部分,那么样板文件的电子生成器指令就可以工作。
{
"languageName": "English",
"lang": "en-us",
"agree": "Agree",
"disagree": "Disagree",
"print": "Print",
"save": "Save",
"description": "",
"message": "If you agree with the terms of this license, press 'Agree' to install the software. If you do not agree, press 'Disagree'"
}