David.dev ūüźć

about ~ apps

27. Oktober 2019 01:46 #electron

How to submit an Electron App to App Store using Electron-Packager

Alright, I haven't given up on submitting my electron app to the Apple Store. So I decided to give electron-packager a try.

I have found a tutorial here but I did have to customize a few things:

First you can run the signing process directly from electron-packager:

*Step 1 *

  npx electron-packager . "elektro" --app-bundle-id=dev.david.elektro
 --helper-bundle-id=dev.david.elektro.helper 
 --app-version=1.0.0 --build-version=1.0.100 --platform=mas-arch=x64 -- 
  Icon=resources/Icon.icns --overwrite 
 --osx-sign  --entitlements=resources/entitlements.mas.plist

clearly you need to replace the apple-bundle-id and helper-bundler-id, entitlements with your paths.

note that using the

--provisioning-profile=

option led to a signature apple from the apple store. 

Step 2 Provisioning Profile

Remember to have your production provisioning profile (you need to get them from developer.apple.com) in thee root folder of your project where you run electron packager (electron-os-x-sign will not report an error if this is missing but the .pkg will have signature mismatch)

*Step 3 Create the .pkg for submission to apple store via Transporter *

npx  electron-osx-flat /elektro-mas-x64/elektro.app --verbose

again replace my path with yours :)

Submission to the Apple store worked ! Let's hope that they can verify it and test it (I can't run the MAS package locally and this seems to be normal...) 

So far the processes seemed easier than using electron-builder (where I had to modify a number of NPM packages before even being able to have a valid package for the apple store). 

I will of course report back if it gets published.  I hope that it won't be as hard to create a package for Windows and Linux !