Skip to content

Commit

Permalink
fix: Mac系统增加访问权限
Browse files Browse the repository at this point in the history
  • Loading branch information
liou666 committed Apr 14, 2023
1 parent 0824b31 commit 52d85a7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
7 changes: 6 additions & 1 deletion electron-builder.json5
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
16 changes: 16 additions & 0 deletions entitlements.mac.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
<key>com.apple.security.device.camera</key>
<true/>
</dict>
</plist>

0 comments on commit 52d85a7

Please sign in to comment.