Please describe your issue:
i'm trying to sign my app on mac, as electron-packager documentation says setting osxSign:true should sign app after packaging
here is my config:
"electronPackagerConfig": {
"name": "SomeAppName",
"icon": "./res/icon.icns",
"osxSign": true
},
for example name and icon properties work correctly but setting osxSign does not do anything
btw running signing command manually works correctly too:
electron-osx-sign "./out/myapp-darwin-x64/myapp.app" --platform=darwin --type=development
can anyone suggest anything?
Console output when you run electron-forge with the environment variable DEBUG=electron-forge:*. (Instructions on how to do so here). Please include the stack trace if one exists.
electron-forge:packager packaging with options { asar: false,
overwrite: true,
name: 'Ublend',
icon: './res/icon.icns',
osxSign: true,
afterCopy: [ [Function], [Function], [Function], [Function] ],
afterExtract: [],
dir: '/Users/GURO/ublend/ublend-electron-app',
arch: 'x64',
platform: 'darwin',
out: '/Users/GURO/ublend/ublend-electron-app/out',
electronVersion: '1.4.15',
quiet: true } +9ms
electron-forge:lifecycle Process Succeeded: Preparing to Package Application for arch: x64 +12s
electron-forge:lifecycle Process Started: Compiling Application +2ms
electron-forge:lifecycle Process Succeeded: Compiling Application +919ms
electron-forge:lifecycle Process Started: Preparing native dependencies +1ms
electron-forge:lifecycle Process Succeeded: Preparing native dependencies +104ms
electron-forge:lifecycle Process Started: Packaging Application +0ms
electron-forge:lifecycle Process Succeeded: Packaging Application +8s
What command line arguments are you passing?
What does your config.forge data in package.json look like?
"config": {
"forge": {
"make_targets": {
"win32": [
"squirrel"
],
"darwin": [
"dmg","zip"
],
"linux": [
"deb",
"rpm"
]
},
"electronPackagerConfig": {
"name": "MyApp",
"icon": "./res/icon.icns",
"osxSign": true
},
"electronWinstallerConfig": {
"name": ""
},
"electronInstallerDebian": {},
"electronInstallerRedhat": {},
"github_repository": {
"owner": "",
"name": ""
},
"windowsStoreConfig": {
"packageName": ""
}
}
}
Please provide either a failing minimal testcase (with a link to the code) or detailed steps to
reproduce your problem. Using electron-forge init is a good starting point, if that is not the
source of your problem.
As answered on Slack. electron-packager hasn't been released yet with a version that supports osxSign, in the mean time use osx-sign.
/cc @malept Am I correct ^^
That's correct. In fact I found some weirdness this morning related to the API naming change, so it's probably a good thing that I didn't release yet. 馃槹
is this working now or is osx-sign still prefered?
The change in Packager was released in 8.6.0, which was on March 14.
Any update here?
I'm absolutely confused on how to get electron-forge to properly sign the app.
Use osxSign inside forge.config.electronPackagerConfig, see the Electron Packager API docs for details.
Okay great figured it out. For anyone else stumbling on this thread, this is what worked for me:
"osxSign": {
"identity": "Mac Developer: NAME (ID CODE HERE)"
},
@onassar Thank you so much for clarifying this. I felt like I was taking crazy pills looking for this. I suppose that's what happens when you have a umbrella framework that is puppeteering all of these other libraries and you have to go spelunking through each library to find what configuration is required.
Anyway, your config worked great. Mine ended up looking like this:
"electronPackagerConfig": {
"osxSign": {
"identity": "Developer ID Application: Joshua Pinter (<my_id>)"
}
}
Great to hear @joshuapinter
Ya you're right on. What I find frustrating is that it's _really_ easy to get started with Electron, but _really_ hard to put together all the pieces to deliver a polished (and functional and tested) app. I think it's due to your point: umbrella framework that is doing an amazing job pulling together all the pieces, but alas, still juggling so many things that it requires us to go deep in a lot of different areas.
Good luck :)
For anyone who finds this looking for a package.json config example, the new key is packagerConfig, not electronPackagerConfig, e.g.:
{
"config": {
"forge": {
"packagerConfig": {
"osxSign": {
"identity": "Developer ID Application: Company (<id>)"
}
}
}
}
}
Most helpful comment
@onassar Thank you so much for clarifying this. I felt like I was taking crazy pills looking for this. I suppose that's what happens when you have a umbrella framework that is puppeteering all of these other libraries and you have to go spelunking through each library to find what configuration is required.
Anyway, your config worked great. Mine ended up looking like this: