How to use electron-notarize - 10 common examples

To help you get started, we’ve selected a few electron-notarize examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github will-stone / browserosaurus / scripts / notarize.ts View on Github external
import { notarize } from 'electron-notarize'

const projectRoot = require('path').resolve(__dirname, '..')

notarize({
  appBundleId: 'com.browserosaurus',
  appPath: projectRoot + '/out/Browserosaurus-darwin-x64/Browserosaurus.app',
  appleId: String(process.env.APPLE_ID),
  appleIdPassword: `@keychain:AC_PASSWORD`,
  ascProvider: 'Z89KPMLTFR',
}).catch(e => {
  console.error("Didn't work :( " + e.message) // eslint-disable-line no-console
})
github electron / electron-packager / src / mac.js View on Github external
async notarizeAppIfSpecified () {
    const osxNotarizeOpt = this.opts.osxNotarize

    /* istanbul ignore if */
    if (osxNotarizeOpt) {
      const notarizeOpts = createNotarizeOpts(
        osxNotarizeOpt,
        this.bundleName,
        this.renamedAppPath,
        this.opts.quiet
      )
      if (notarizeOpts) {
        return notarize(notarizeOpts)
      }
    }
  }
github ooni / probe-desktop / scripts / notarize.js View on Github external
exports.default = async function notarizing(context) {
  const { electronPlatformName, appOutDir } = context;
  if (electronPlatformName !== 'darwin') {
    return
  }

  const appName = context.packager.appInfo.productFilename
  const appBundleId = pkg.build.appId
  if (appBundleId.length < 3) {
    throw Error(`Invalid build.appId: ${appBundleId}`)
  }

  console.log(`Notarizing the app "${appBundleId}"`)
  return await notarize({
    appBundleId: appBundleId,
    appPath: `${appOutDir}/${appName}.app`,
    appleId: process.env.APPLEID,
    appleIdPassword: process.env.APPLEIDPASS,
  })
}
github uetchy / juno / scripts / after-sign-mac.js View on Github external
async function notarizeApp() {
  console.log(`afterSign: Notarizing ${appBundleId} in ${appPath}`)
  await notarize({
    appBundleId,
    appPath,
    appleId,
    appleIdPassword,
    ascProvider,
  })
  console.log('afterSign: Notarized')
}
github karaggeorge / electron-builder-notarize / index.js View on Github external
const {packageJson} = readPkgUp.sync();
	const {appId} = packageJson.build;

	const appPath = path.join(params.appOutDir, `${params.packager.appInfo.productFilename}.app`);

	const notarizeOptions = {appBundleId: appId, appPath};
	if (authInfo.appleId) {
		notarizeOptions.appleId = authInfo.appleId;
		notarizeOptions.appleIdPassword = authInfo.appleIdPassword;
	} else {
		notarizeOptions.appleApiKey = authInfo.appleApiKey;
		notarizeOptions.appleApiIssuer = authInfo.appleApiIssuer;
	}

	console.log(`Notarizing ${appId} found at ${appPath}`);
	await notarize(notarizeOptions);
	console.log(`Done notarizing ${appId}`);
};
github Netflix-Skunkworks / stethoscope-app / scripts / maybeNotarize.js View on Github external
'APPLE_API_KEY and APPLE_API_ISSUER env vars are required'
      )
    }
    params.appleApiKey = APPLE_API_KEY
    params.appleApiIssuer = APPLE_API_ISSUER
  } else {
    params.appleId = APPLE_ID
    params.appleIdPassword = APPLE_ID_PASS
  }

  if (ASC_PROVIDER) {
    params.ascProvider = ASC_PROVIDER
  }

  console.log('Notarizing app, coffee time?')
  return notarize(params)
}
github jasperapp / jasper / script / mac / notarize.js View on Github external
async function notarizeApp() {
  console.log(`afterSign: Notarizing ${appBundleId} in ${appPath}`);
  await notarize({
    appBundleId,
    appPath,
    appleId: account.id,
    appleIdPassword: account.password,
    ascProvider,
  });
  console.log('afterSign: Notarized');
}
github kitze / JSUI / scripts / after-sign.js View on Github external
let appPath = path.join(appOutDir, `${params.packager.appInfo.productFilename}.app`);

  if (!fs.existsSync(appPath)) {
    throw new Error(`Cannot find application at: ${appPath}`);
  }

  console.log(`Notarizing ${appId} found at ${appPath}`);

  try {
    const notarizeConfig = {
      appBundleId: appId,
      appPath: appPath,
      appleId: APPLE_ID,
      appleIdPassword: APPLE_ID_PASS
    };
    await notarize(notarizeConfig);
  } catch (error) {
    console.error(error);
  }

  console.log(`Done notarizing ${appId}`);
};

electron-notarize

Notarize your Electron app

MIT
Latest version published 2 years ago

Package Health Score

59 / 100
Full package analysis

Popular electron-notarize functions

Similar packages