From 52d85a75c2176d8664f6b1e3471124397da36de5 Mon Sep 17 00:00:00 2001 From: liou Date: Fri, 14 Apr 2023 20:59:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Mac=E7=B3=BB=E7=BB=9F=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=AE=BF=E9=97=AE=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron-builder.json5 | 7 ++++++- entitlements.mac.plist | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 entitlements.mac.plist diff --git a/electron-builder.json5 b/electron-builder.json5 index 0339725..76856e9 100644 --- a/electron-builder.json5 +++ b/electron-builder.json5 @@ -16,7 +16,12 @@ ], "mac": { "artifactName": "${productName}_${version}.${ext}", - "target": ["dmg"] + "target": ["dmg"], + "entitlements": "entitlements.mac.plist", + "hardenedRuntime": true, + "extendInfo": { + "NSMicrophoneUsageDescription": "请允许本程序访问您的麦克风" + } }, "win": { "icon": "public/win.ico", diff --git a/entitlements.mac.plist b/entitlements.mac.plist new file mode 100644 index 0000000..0602d75 --- /dev/null +++ b/entitlements.mac.plist @@ -0,0 +1,16 @@ + + + + + com.apple.security.cs.allow-jit + + com.apple.security.cs.allow-unsigned-executable-memory + + com.apple.security.cs.allow-dyld-environment-variables + + com.apple.security.device.audio-input + + com.apple.security.device.camera + + +