Skip to content

Commit

Permalink
adding mac notarization
Browse files Browse the repository at this point in the history
  • Loading branch information
tnrich committed Sep 23, 2019
1 parent f63fc8e commit 533916c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
"repo": "ove-electron",
"owner": "tnrich"
},
"afterSign": "src/misc/notarize.js",
"mac": {
"hardenedRuntime": true,
"gatekeeperAssess": false,
"/entitlements": "src/misc/entitlements.mac.plist",
"/entitlementsInherit": "src/misc/entitlements.mac.plist"
},
"appId": "com.teselagen.openVectorEditor",
"fileAssociations": [
{
Expand Down
8 changes: 8 additions & 0 deletions src/misc/entitlements.mac.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?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-unsigned-executable-memory</key>
<true/>
</dict>
</plist>
17 changes: 17 additions & 0 deletions src/misc/notarize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const { notarize } = require('electron-notarize');

exports.default = async function notarizing(context) {
const { electronPlatformName, appOutDir } = context;
if (electronPlatformName !== 'darwin') {
return;
}

const appName = context.packager.appInfo.productFilename;

return await notarize({
appBundleId: 'com.teselagen.yourAppId',
appPath: `${appOutDir}/${appName}.app`,
appleId: process.env.APPLEID,
appleIdPassword: process.env.APPLEIDPASS,
});
};

0 comments on commit 533916c

Please sign in to comment.