Skip to content

Instantly share code, notes, and snippets.

@yoannmoinet
Last active November 28, 2017 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoannmoinet/347e43a257fdc6f199ad453759eb1460 to your computer and use it in GitHub Desktop.
Save yoannmoinet/347e43a257fdc6f199ad453759eb1460 to your computer and use it in GitHub Desktop.
Sign Mac OS X app for production.
import { sign, flat } from 'electron-osx-sign';
import { PARENT_PLIST_PATH, CHILD_PLIST_PATH, PROVISIONING_PROFILE } from './config';
const signApp = (appPath, pkgPath) => {
const resourcesPath = path.join(appPath, './Contents/Resources/');
const signOpts = {
app: appPath,
platform: 'mas',
binaries: [ /* Here goes the list of binaries you have in your app, like the widevine plugin. */ ],
entitlements: PARENT_PLIST_PATH,
'entitlements-inherit': CHILD_PLIST_PATH,
'provisioning-profile': PROVISIONING_PROFILE,
identity: '3rd Party Mac Developer Application: Yoann MOINET (REDACTED)',
type: 'distribution',
};
const flatOpts = {
app: appPath,
identity: '3rd Party Mac Developer Installer: Yoann MOINET (REDACTED)',
platform: 'mas',
pkg: pkgPath
};
sign(signOpts);
flat(flatOpts);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment