Skip to content

Commit 9929e85

Browse files
authored
chore(desktop): add "mas" build config (mac app store) (netless-io#1872)
To use it, add '- { target: mas, arch: universal }' in the builder config yaml file.
1 parent ee9fba3 commit 9929e85

File tree

8 files changed

+59
-4
lines changed

8 files changed

+59
-4
lines changed

cspell.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ module.exports = {
2020
"signup",
2121
"dataurl",
2222

23+
// appstore
24+
"flatmacrelease",
25+
"provisionprofile",
26+
2327
// wechat
2428
"wechat",
2529
"jssdk",

desktop/main-app/electron-builder/CN.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ mac:
1616
hardenedRuntime: true
1717
entitlements: entitlements.mac.plist
1818
entitlementsInherit: entitlements.mac.plist
19+
provisioningProfile: flatmacrelease.provisionprofile
1920
gatekeeperAssess: false
2021
extendInfo:
2122
LSHasLocalizedDisplayName: true
@@ -28,6 +29,13 @@ mac:
2829
- target: default
2930
arch:
3031
- x64
32+
mas:
33+
hardenedRuntime: true
34+
type: distribution
35+
category: public.app-category.productivity
36+
entitlements: entitlements.mac.mas.plist
37+
entitlementsInherit: entitlements.mac.mas.plist
38+
gatekeeperAssess: true
3139

3240
dmg:
3341
contents:
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.cs.allow-jit</key>
6+
<true/>
7+
<key>com.apple.security.application-groups</key>
8+
<string>48TB6ZZL5S.io.agora.flat</string>
9+
<key>com.apple.security.inherit</key>
10+
<true/>
11+
<key>com.apple.security.app-sandbox</key>
12+
<true/>
13+
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
14+
<true/>
15+
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
16+
<true/>
17+
<key>com.apple.security.device.audio-input</key>
18+
<true/>
19+
<key>com.apple.security.device.camera</key>
20+
<true/>
21+
</dict>
22+
</plist>
12.2 KB
Binary file not shown.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@
102102
"overrides": {
103103
"@types/eslint": "^8",
104104
"@types/react": "^17"
105+
},
106+
"patchedDependencies": {
107+
105108
}
106109
}
107110
}

patches/[email protected]

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/out/macPackager.js b/out/macPackager.js
2+
index e0b51e3484c8e91e350b7827605f2edec51b1bfd..20b657ba49f20fb0ec952f43f0b3c64bd4bf1eb3 100644
3+
--- a/out/macPackager.js
4+
+++ b/out/macPackager.js
5+
@@ -382,6 +382,6 @@ function getCertificateTypes(isMas, isDevelopment) {
6+
if (isDevelopment) {
7+
return isMas ? ["Mac Developer", "Apple Development"] : ["Developer ID Application"];
8+
}
9+
- return isMas ? ["Apple Distribution"] : ["Developer ID Application"];
10+
+ return isMas ? ["Apple Distribution", "3rd Party Mac Developer Application"] : ["Developer ID Application"];
11+
}
12+
//# sourceMappingURL=macPackager.js.map

pnpm-lock.yaml

Lines changed: 9 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

service-providers/agora-rtc/agora-rtc-electron/scripts/download-agora-addon/patch-download.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ download({
2121
platform: platform === "win" ? "win32" : "darwin",
2222
arch: "x64",
2323
packageVersion: agoraVersion,
24-
no_symbol: false,
24+
no_symbol: true,
2525
});

0 commit comments

Comments
 (0)