How to sign Mac application (DMG target)
See original GitHub issue- Version: 7.10.2
- Target: Mac
I have difficuties signing a Mac app with target DMG. MAS builds are signed just fine when downloading from GDrive for example, but the file://...
method produces the same errors as described below for the DMG targets.
First I created a 3rd Party Mac Developer Application
and a 3rd Party Mac Developer Installer
certificate. Following the code sigining instructions on the Wiki, I exported two *.p12 files and exported the following environment variables:
CSC_LINK=https://drive.google.com/uc?export=download&id=app.p12
CSC_KEY_PASSWORD=password
CSC_INSTALLER_LINK=https://drive.google.com/uc?export=download&id=installer.p12
CSC_INSTALLER_KEY_PASSWORD=password
With a DMG target, I get the following error:
Warning: App is not signed: CSC_LINK is not specified, and no valid identity in the keychain, see https://github.com/electron-userland/electron-builder/wiki/Code-Signing
Must be "Developer ID Application:" or custom non-Apple code signing certificate
Creating DMG
Unhandled rejection Error: data has additional properties, data has additional properties
Then, I exported also CSC_NAME="3rd Party Mac Developer Application: Company, Inc. (534FHX123DHR)"
, which produced the error Unhandled rejection Error: Please remove prefix "3rd Party Mac Developer Application:" from the specified name — appropriate certificate will be chosen automatically
Ok, removing the requested parts including the team ID, leaves me with this: Unhandled rejection Error: Identity name "Company, Inc." is specified, but no valid identity with this name in the keychain
I also imported the cert and private key into the keychain, but that produces the same error. I appreciate your help.
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (4 by maintainers)
Top GitHub Comments
Yes, 7.10.3 fixes the aforementioned error!
spctl
andcodesign
also seem to be happy now.Duplicates https://github.com/electron-userland/electron-builder/issues/710#issuecomment-244389520
This certificate is not valid to sign mac application, please see https://github.com/electron-userland/electron-builder/wiki/Code-Signing#how-to-export-certificate-on-macos Must be
Developer ID Application: