Skip to content

Commit a02437e

Browse files
committed
fix: Prepping for notarizing
1 parent c661bd3 commit a02437e

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

entitlements.mac.plist

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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-unsigned-executable-memory</key>
6+
<true/>
7+
</dict>
8+
</plist>

package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@
134134
"build": {
135135
"productName": "Reactotron",
136136
"appId": "com.reactotron.app",
137+
"afterSign": "scripts/notarize.js",
137138
"files": [
138139
"src/dist/",
139140
"src/app.html",
@@ -142,6 +143,7 @@
142143
"package.json"
143144
],
144145
"dmg": {
146+
"sign": false,
145147
"contents": [
146148
{
147149
"x": 130,
@@ -155,6 +157,12 @@
155157
}
156158
]
157159
},
160+
"mac": {
161+
"hardenedRuntime": true,
162+
"gatekeeperAssess": false,
163+
"entitlements": "entitlements.mac.plist",
164+
"entitlementsInherit": "entitlements.mac.plist"
165+
},
158166
"win": {
159167
"icon": "./icon.png",
160168
"target": [

scripts/notarize.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
require('dotenv').config();
2+
const { notarize } = require('electron-notarize');
3+
4+
exports.default = async function notarizing(context) {
5+
const { electronPlatformName, appOutDir } = context;
6+
if (electronPlatformName !== 'darwin' || !process.env.APPLEID) {
7+
return;
8+
}
9+
10+
const appName = context.packager.appInfo.productFilename;
11+
12+
return await notarize({
13+
appBundleId: 'com.yourcompany.yourAppId',
14+
appPath: `${appOutDir}/${appName}.app`,
15+
appleId: process.env.APPLEID,
16+
appleIdPassword: process.env.APPLEIDPASS,
17+
});
18+
};

0 commit comments

Comments
 (0)