赞
踩
export PYTHON_PATH=python;
vue-cli-service electron:build --mac
export CSC_LINK=[.p12路径];export CSC_KEY_PASSWORD=******;
xcrun notarytool store-credentials "mac_app" --apple-id "xxxxxxxx@xxx.com" --team-id "XXXXXXXXXX" --password "xxxx-xxxx-xxxx-xxxx"
store-credentials:名字,建议全英文
apple-id:Apple ID
team-id:团队ID developer.apple.com/account/可以查看到
password:App专用密码,可以在AppleID管理!!那里生成 格式为“****-****-****-****”
登录:https://appleid.apple.com/sign-in
- xcrun altool --list-providers -u "********@***.com" -p "****-****-****-****"
-
- # 返回结果
- # ProviderName ProviderShortname PublicID WWDRTeamID
- # ------------ ----------------- -------- ----------
- # ** Co., Ltd. ***** **** ****
- {
- ...
- build:{
- afterSign: "notarize.js",
- ...
- mac: {
- hardenedRuntime: true,
- gatekeeperAssess: false,
- target: [{
- target: 'dmg'
- }],
- ...
- },
- ...
- dmg: {
- sign: false,
- ...
- }
- }
- ...
- }
npm install -g electron-notarize
- 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.***.***', // app的包名
- appPath: 'dist/mac/****.app', // 生成的app的路径
- appleId: '********@***.com', // 苹果AppleId
- appleIdPassword: '****-****-****-****', // 上述生成的APP专属密码
- });
- };
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。