我第一次尝试签署一个电子应用程序(通过electron-forge
,使用@electron/osx-sign
的引擎盖下)和公共在Mac应用程序商店。
在几次错误之后,我可以成功签名,但其中两次错误仍然存在:
Asset validation failed (90287)
Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. The bundle contains a key that is not included in the provisioning profile: 'com.apple.application-identifier' in 'com.COMPANY.APP.pkg/Payload/APP.app/Contents/MacOS/APP'. (ID: ***)
Asset validation failed (90287)
Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. The bundle contains a key that is not included in the provisioning profile: 'com.apple.developer.team-identifier' in 'com.COMPANY.APP.pkg/Payload/APP.app/Contents/MacOS/APP'. (ID: ***)
当我试图通过苹果的Transporter发送时,就会发生这种情况。我正在搜索最后几天,但我所做的一切都是徒劳的,比如:
- 下载不同的预置描述文件:开发、分发、开发人员;
- 通过CLI手动签名/公证;
- 使用开发/分发环境;
我的配置文件:
const path = require('path');
const fs = require('fs');
require('dotenv').config();
const APP_BUNDLE_ID = 'com.COMPANY.APP';
const MACOS_ENTITLEMENTS_PATH = path.join('osx', 'entitlements.plist');
module.exports = {
packagerConfig: {
icon: './assets/icon.ico',
appBundleId: APP_BUNDLE_ID,
appVersion: process.env.APP_VERSION,
name: 'APP',
appCategoryType: 'public.app-category.developer-tools',
darwinDarkModeSupport: true,
executableName: 'APP',
osxUniversal: {
mergeASARs: true,
x64ArchFiles: '**/{node_modules/\.cache,node_modules}/**'
},
osxSign: {
identity: process.env.APPLE_SIGN_IDENTITY,
provisioningProfile: path.join('osx', 'dist.provisionprofile'),
hardenedRuntime: true,
entitlements: MACOS_ENTITLEMENTS_PATH,
'entitlements-inherit': MACOS_ENTITLEMENTS_PATH,
'signature-flags': 'library',
'gatekeeper-assess': false,
},
osxNotarize: {
appleId: process.env.APPLE_SIGN_APPLEID,
appleIdPassword: process.env.APPLE_SIGN_APPLEIDPASSWORD,
}
},
makers: ['...']
}
我的权利文件:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"https://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
</dict>
</plist>
问题是:如何将这些密钥添加到我的预配概要文件?这样做正确吗?
提前感谢!
1条答案
按热度按时间eoxn13cs1#
我可以通过理解几个主题来解决它:
electron-forge
不会更新electron-notarize
包中的所有字段,其中一个字段是provisioningProfile
,您需要将其放在根文件夹中才能加载它。DEBUG=electron-osx-sign*
设置为具有完整的签名日志。electron-forge
的make管道签署的包。