我第一次尝试在Mac中签署一个电子应用程序(通过electron-forge,它在引擎盖下使用@electron/osx-sign )和公众。
在几个错误之后,我可以成功地签名,但其中两个仍然存在:
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: ***)当我试图通过苹果公司的传输程序发送它时,就会发生这种情况。我在寻找最后的日子,但我所尝试的一切都是徒劳的,就像:
Developer;
我的配置文件:
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>问题是:我如何将这些密钥添加到我的配置文件中?这是正确的做法吗?
提前感谢!
发布于 2022-08-11 10:09:09
我可以通过理解以下几个主题来解决这个问题:
electron-forge不更新electron-notarize包中的所有字段,其中一个字段是provisioningProfile。您需要将它放在根文件夹中才能加载它。DEBUG=electron-osx-sign*设置为有一个完整的签名日志。electron-forge的make管线签名的包。https://stackoverflow.com/questions/73311205
复制相似问题