Closed piersebdon closed 4 years ago
This won't run on Catalina at all, sadly.
I've disabled Gatekeeper, allowed the Mac to run Apps from unidentified sources, but it still won't launch (even with right click - open)
@piers12 Hi, I Managed to build it on Catalina. All I had to do is to clone the project, npm install
, npm run release
, And then use the app built in PushNotifications-darwin-x64
folder.
What @yogevbd said unblocked me. thanks a lot!
@yogevbd Will give that a try Thanks!
@onmyway133 just FYI, you need to notarize the app with Apple for it to be runnable. I'm not sure if you plan on doing that, but there's a good writeup here:
https://kilianvalkhof.com/2019/electron/notarizing-your-electron-application/
I'd do it but considering you're the owner this repo it makes more sense for you to use your own Apple ID.
For other people having this issue, if you move the app to your Applications folder and right-click -> Open you can open the app.
@marinbenc thanks for the tip, I will do that
@marinbenc hi, I just uploaded a notarized build https://github.com/onmyway133/PushNotifications/releases/tag/1.7.0, can you help check
Ping @Ariandr
Hi @onmyway133
I've read the article. As I understood, electron-builder
can create unsigned .dmg
file with notarized .app
inside.
It says: Gatekeeper software seems to detect the notarized .app inside the DMG and will let users install your software without problems.
So, if you notarized the app and shared it as a .zip
, you should also be able to attach a new .dmg
file to the build artifacts section.
@onmyway133 running this on Catalina, it still doesn't seem to open, even though running spctl --assess --verbose Push\ Notifications.app
shows it as accepted
.
I don't know much about Electron, but it's possible there's a framework in the project that Gatekeeper doesn't like.
I also noticed the bundle ID in afterSignHook.js is different from the one in package.json (it should probably be com.onmyway133.PushNotifications)
Also @Ariandr is correct, right now you can have an unsigned, unnotarized DMG as long as the .app inside is notarized.
However if you sign the DMG it has to be notarized, so make sure it's not signed.
@Amin-Rehman @marinbenc thanks, I fixed afterSignHook appId and make new build https://github.com/onmyway133/PushNotifications/releases/tag/1.7.0
For some reason, I specified target for mac, but it does not generate dmg, @Ariandr what else should we do?
@onmyway133
Try to modify package.json
scripts section like that.
"scripts": {
"start": "npx electron main.js",
"pack": "electron-builder --dir",
"dist": "electron-builder"
}
And then execute npm run dist
.
Also, in targets you might try to specify:
"dmg": {
"sign": false
}
It's described here: https://kilianvalkhof.com/2019/electron/notarizing-your-electron-application/
If nothing helps, I don't know. I personally didn't notarize any apps.
@onmyway133
Also, have you checked the dist
folder after executing the command? It should contain both zip
and dmg
@onmyway133 I've come across this article: https://medium.com/@TwitterArchiveEraser/notarize-electron-apps-7a5f988406db
Maybe you've seen it too.
@Ariandr Hi, I read them, thanks. I checked dist
folder and there is only app
file there. About notarization, I checked with spctl
and it seems OK
Push Notifications.app: accepted
source=Developer ID
Hi @onmyway133 I see. If I find any other possible solutions to the problem, I'll let you know.
@onmyway133
Maybe if we build with MacOS Catalina, it will work there and it will be enough to just share app
in .zip
file.
I haven't updated any of my devices yet to Catalina, waiting for the official release.
@Ariandr thanks, I'm waiting for official Catalina too
Hey guys,
In order to be able to open the app on macOS Catalina you need to install the app using .dmg
and also follow this instruction.
Check out the latest release here
@piers12 Hi, thanks for the suggestion. I haven't tried running this on Catalina yet