While the good folks at Electron are fixing the issue for submitting to the apple store I decided to take the dust of my windows razer laptop and do what electron is supposed to do so well: build a windows version for my retro MP3 player.
With the excellentElectron Windows Store package I thought that submitting it would be trivial. Not really! Missing some important steps will result in several wasted hours debugging. There are several not-so-documented steps that you need to take into account to prepare your app for submission to the Microsoft store (or windows apps store)
You will need a Microsoft Developer Account. This has a cost of around 19$. To package you also need the Windows SDK.
You will now need to register your app (and register the relevant name) through the dashboard you will need to complete this before you start making your .appx package (the format accepted by the Microsoft/Windows store).
Select your freshly created app in the dashboard and navigate to Product Management-->Product Identity. Here you will find the Package/Identity/Name and Package/Identity/Publisher Both are important for the next steps so save them in a text file for future reference
*Step 4 *
you can now package your app using electron-builder with npm run build (PS I also tried with electron-packager but I do get an icon error that seems not so easy to fix). If you are on a Windows machine you don't need to specify anything on package.json. Electron-builder will automatically create the win-unpacked that we need for the next step.
Now you can run electron-windows-store for example just specifying input, output folder, app version and name
npx electron-windows-store --input-directory C:\Users\gurug\Downloads\trommel\trommel-master\dist\win-unpacked out --package-version 126.96.36.199 --package-name trommel
this will take you through the electron-windows-store setup now very important answer yes to create certificate and as organization use Package/Identity/Publisher as per step 3 that will look like like this
this step is essential else electron-windows-store will create a development certificate will be
that all not be accepted by the Microsoft Store. Note that you do not need to buy a developer certificate to submit your app to the store. A self-signed developing certificate that is generated by electron-windows-store will work fine as long as the publisher matches what is displayed in your apps dashboard for your specific app (see Step 3).
also the default bin location used by electron-windows store
C:\\\\Program Files (x86)\\\\Windows Kits\\\\10\\\\bin\\\\x64",
doesn't match the default installation of the latest Windows SDK
the format I have is
C:\\\\Program Files (x86)\\\\Windows Kits\\\\10\\\\bin\\\\10.0.18362.0\\\\x64",
so be sure to modify it on the cli setup.
*Step 6 *
We can now build the package using
C:\\Program Files (x86)> npx electron-windows-store --input-directory C:\\Users\\(PATH\_TO\_YOUR\_win-unpacked\_folder) \\out --package-version 188.8.131.52 --package-name (yourAPPNAME) --publisher-display-name (YOUR\_DISPLAY\_NAME) --identity-name AS\_STEP\_3
you should now have a properly signed .appx package that you can upload for approval in the Microsoft/Windows app store.
This is it for now! Will report back with the outcome from the store. (currently in verification).