Search code examples
macoselectronapp-store-connectelectron-builder

Is it still possible to publish an Electron app to the Mac Store?


I'm trying to successfully submit my Electron app to the Mac Store. I want to put it into TestFlight, similar to how I am submitting the corresponding iOS app. Ultimately, I want both of these processes to be part of a CI pipeline. The iOS version of this is ready to go.

For the Electron app, I'm using Electron-Builder to do the packaging and signing, and leveraging electron-builder-notarize to get past the Apple notarization step. After about a week of diving down several rabbit holes that became full-fledged rabbit warren metropolises, I finally have a working combination of configuration settings, certificates, plists, and pixie dust in place that my pipeline successfully builds and notarizes my "mas" target package.

I thought that once I had gotten past the rather hellish notarization step, I would be pretty much out of the woods -- after all, Apple 'notarized' it (and sent me an email to prove it). But when I use the Apple Transporter app to post it to the App Store (I'm using this manually for now until I prove this works, then later I'll use the CLI commands for it to complete my CI implementation) it reports the app is rejected with 5 issues. These are actually variations of the same thing:

  • Electron.app' is already in use by another application.
  • Electron.app/Contents/Frameworks/Electron Helper (GPU).app' is already in use by another application.
  • /Electron.app/Contents/Frameworks/Electron Helper (Plugin).app' is already in use by another application.
  • Electron.app/Contents/Frameworks/Electron Helper (Renderer).app' is already in use by another application.
  • Electron.app/Contents/Frameworks/Electron Helper.app' is already in use by another application.

I thought Electron-Builder was supposed to deal with these internal ids. My "mas" block of the config looks like

    "mas": {
      "type": "distribution",
      "hardenedRuntime": false,
      "provisioningProfile": "embedded.provisionprofile",
      "entitlements": "build/entitlements.mas.plist",
      "entitlementsInherit": "build/entitlements.mas.inherit.plist",
      "entitlementsLoginHelper": "build/entitlements.mas.loginhelper.plist",
      "publish": null
    },

which I believe is what is needed to specify that these inner binaries are signed. Perhaps not. Copying others who also had to abandon the docs is not necessarily a guarantee of success. But these things did get me this far.

I've scoured SO and other Internet sites, and of course the poorly written and often obscure official documentation sources, but I can't find the answer to this.

In my travels, I happened across this blog which makes me think that even if I get past this part, there may still be a long bumpy road ahead, and it may turn out to be a dead end.

I notice a lot of developers have commented they chose to abandon the Mac store and instead simply self-publish with their own URL link for download. That seems to be a shame, at the very least, and certainly not my preference.

It makes we wonder if this is even possible. Many of the posts (not to mention the docs) contain outdated information, and few posts are more recent than more than a year. Many things have changed. Maybe everyone threw in the towel. Am I on a futile quest?


Solution

  • I believe I found the answer to the main question of "is it possible?" I may still run into other issues, but I've discovered the main problem.

    My Electron project is in a different construction than that of the "Electron-quick-start" template, so the Electron-builder packaging and signing steps do not find what they are looking for in all the normal places.

    I am not 100% sure I can successfully reconstruct my project into the 'canonical' format, but that appears to be the solution.

    I was able to create a basic quick-start app and upload it to the App Store in a matter of minutes, so all the parts do in fact work. The project just need to be of the right construction.