question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 7 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
eriedl-kibancommented, Oct 6, 2016

Yes, 7.10.3 fixes the aforementioned error! spctl and codesign also seem to be happy now.

Packaging for platform mas x64 using electron 1.4.2 to out/packages/mas

Downloading electron-v1.4.2-mas-x64.zip
[>                                            ] 3.6% of 41.07 MB (730.37 kB/s)
Downloading electron-v1.4.2-mas-x64.zip
[============================================>] 100.0% of 41.07 MB (5.66 MB/s)
Creating DMG
Warning: dmg.title is not supported, file issue if need
Warning: dmg.background-color is deprecated, please use dmg.backgroundColor instead
Signing app (identity: 3rd Party Mac Developer Application: Company, Inc. (XYZ))

Signing app (identity: 3rd Party Mac Developer Application: Company, Inc. (XYZ))

5591:eriedl:eriedl-mbp15:8:01:13 ~/sources> spctl -v -a out/packages/mac/MyApp.app
out/packages/mac/MyApp.app: accepted
source=Developer ID
5592:eriedl:eriedl-mbp15:8:01:53 ~/sources> codesign --verify --verbose out/packages/mas/MyApp.app
out/packages/mas/MyApp.app: valid on disk
out/packages/mas/MyApp.app: satisfies its Designated Requirement
5593:eriedl:eriedl-mbp15:8:03:10 ~/sources> codesign --verify --verbose out/packages/mac/MyApp.app
out/packages/mac/MyApp.app: valid on disk
out/packages/mac/MyApp.app: satisfies its Designated Requirement
2reactions
develarcommented, Oct 5, 2016

Duplicates https://github.com/electron-userland/electron-builder/issues/710#issuecomment-244389520

3rd Party Mac Developer Application

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:

Read more comments on GitHub >

github_iconTop Results From Across the Web

Signing a Mac Product For Distribution
Apps and non-apps can be distributed outside of the Mac App Store using Developer ID signing. A Mac App Store app must be...
Read more >
macos - How to sign DMG and installer for OSX
An application certificate and an installer cetificate. Check your certs (which you can do via the "My Certificates" in the Keychain Access app...
Read more >
How to sign Mac application (DMG target)
I have difficuties signing a Mac app with target DMG. MAS builds are signed just fine when downloading from GDrive for example, ...
Read more >
Any macOS Target
MAS entitlements is specified in the mas. See this folder in osx-sign's repository for examples. Be aware that your app may crash if...
Read more >
How to Make a DMG File on a Mac: 11 Steps (with Pictures)
1. Create a New Folder for your files. Place the files you would like in your disk image into this new folder for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found