onmyway133 / PushNotifications

🐉 A macOS, Linux, Windows app to test push notifications on iOS and Android
https://onmyway133.com
Other
2.26k stars 176 forks source link

MacOS Catalina Support #17

Closed piersebdon closed 4 years ago

onmyway133 commented 5 years ago

@piers12 Hi, thanks for the suggestion. I haven't tried running this on Catalina yet

findrails commented 5 years ago

This won't run on Catalina at all, sadly.

Screenshot 2019-07-09 at 11 50 24

I've disabled Gatekeeper, allowed the Mac to run Apps from unidentified sources, but it still won't launch (even with right click - open)

yogevbd commented 5 years ago

@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.

Amin-Rehman commented 4 years ago

What @yogevbd said unblocked me. thanks a lot!

piersebdon commented 4 years ago

@yogevbd Will give that a try Thanks!

marinbenc commented 4 years ago

@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.

marinbenc commented 4 years ago

For other people having this issue, if you move the app to your Applications folder and right-click -> Open you can open the app.

onmyway133 commented 4 years ago

@marinbenc thanks for the tip, I will do that

onmyway133 commented 4 years ago

@marinbenc hi, I just uploaded a notarized build https://github.com/onmyway133/PushNotifications/releases/tag/1.7.0, can you help check

Ping @Ariandr

Ariandr commented 4 years ago

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.

marinbenc commented 4 years ago

@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.

onmyway133 commented 4 years ago

@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?

Ariandr commented 4 years ago

@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.

Ariandr commented 4 years ago

@onmyway133 Also, have you checked the dist folder after executing the command? It should contain both zip and dmg

Ariandr commented 4 years ago

@onmyway133 I've come across this article: https://medium.com/@TwitterArchiveEraser/notarize-electron-apps-7a5f988406db

Maybe you've seen it too.

onmyway133 commented 4 years ago

@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
Ariandr commented 4 years ago

Hi @onmyway133 I see. If I find any other possible solutions to the problem, I'll let you know.

Ariandr commented 4 years ago

@onmyway133 Maybe if we build with MacOS Catalina, it will work there and it will be enough to just share app in .zip file.

Ariandr commented 4 years ago

I haven't updated any of my devices yet to Catalina, waiting for the official release.

onmyway133 commented 4 years ago

@Ariandr thanks, I'm waiting for official Catalina too

Ariandr commented 4 years ago

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