- How To Package Electron App
- Electron App Package For Machine
- Electron App Package For Mac
- What's App Package For Zong
Code signature. Now it’s time to sign the app. Create your application bundle (.app directory with the well-known Mac apps structure) and run the following command: $ codesign --deep --force --verbose --sign ' Application.app. You should get an output similar to the following.
Posted by3 years ago
Archived
I'm trying to package my recent electron app. I tried to use electron-packager and I actually build the app though it is a bunch of files.
Now I'm facing some problems:
- How do I change the app icon? I did it by setting its path in BrowserWindow creation, but shouldn't I be able to do it with electron packager?
- And what about the actual desktop icon?
- And finally how should I do to package all the files built by electron-packager in one .exe?
I'm building it in windows for windows architecture.
5 comments
Build The MAS App
The first step is to compile your application into an .app bundle. Notice that the --platform which you would normally expect to be 'darwin' is instead 'mas' to indicate this build is for the Mac App Store. Currenly only sethlu's fork supports the mas platform. The difference is that MAS builds ommit certain libraries and private API calls that will cause the electron app to be rejected.
Open terminal and CD to your application source directory. Run the following command:
Parameter Details:
The arguments are all documented, however below are additional details that apply specifically to building apps for the Mac App Store.
- the dot '.' is the path to your source code. In this case it assumes that your current directory is your source directory.
- --app-bundle-id must match your Bundle ID that you assigned in iTunes Connect.
- --helper-bundle-id is the same as your app-bundle-id with '.helper' prepended. Unless you have overridden the defaults for the helper bundle this value will be fine.
- --app-version must match your Version Number in iTunes Connect.
- --build-version the first two numbers must match the app-version (1.0.x). The third number can be any number that is larger than app-version's third number. It must be a unique number each time you submit a new build. For example, the first time submit a binary it is 1.0.100. If you make changes and submit another build, the third number must be incremented by at least 1 number, for example 1.0.101. You must increment the third number for each build that you submit.
- --version refers to the version of Electron. At the time of this writing 0.36.7 is the most recent.
- --ignore is a regex of files that you do not wish to package into your app bundle.
- --icon is the path to the Icon.icns file that you created for your application.
Sign The App Bundle
If you have only one set of production certifications from iTunes Connect and your app does not have any special entitlements, then you can sign your app, allowing electron-osx-sign to automatically detect your certificates.
If you have packaged any additional binaries in your app:
If your app includes any additional binary files (command-line applications for example) then those binaries also need to be signed. You can specify additional binaries after the path to your .app bundle, but before the arguments:
If you have multiple developer identities in your keychain:
electron-osx-sign searches your keychain for the first signing certificates that it can locate. If you have multiple certificates then it may not know which cert you want to use for signing and you need to explicitly provide the name:
Create The Signed Installer Package
The final build step is to 'flatten' your app bundle into an installer package. This .pkg file is what you will submit to the app store.
If you only have one signing certification then the following command will produce a signed installer package:
![Electron Electron](/uploads/1/2/4/6/124698197/321223577.png)
If you have multiple developer identities in your keychain:
Similar to osx-sign, osx-flat will auto-detect your signing certificate path. If you have multiple certificates then you will need to specify it:
Submit Your Installer Package to the App Store
You should now have a signed .pkg file in the same directory as your .app file. This is your installer package.
How To Package Electron App
NOTE: It is important that you do not manually rename, or make changes of any kind to these files after signing them. If you need to rename files, do it before you sign them.
To submit your signed app you must use the Application Loader which is included with Xcode. You can open it using Spotlight, or by opening Xcode and going to the menu: Xcode > Open Developer Tools > Application Loader.
App Submission
Application Loader is simple to use. After you login using your Developer Program credentials, double click the 'Deliver Your App' button. This will open a file chooser dialog which allows you to select your .pkg file that you created.
App Validation
Electron App Package For Machine
Application Loader will first search your iTunes Connect account for a matching application based on the Bundle ID and Version Number. If a suitable application is found then it will display and allow you to continue.
After you choose to continue, Application Loader will perform validation on your application to ensure that everything is signed properly. If there are any problems they will be displayed for you to correct. Otherwise your binary will be submitted and ready for you to submit for review.
Congratulations!
Electron App Package For Mac
You app is now submitted. Proceed to iTunes connect and ensure that all of the required information about your app has been completed. Your binaries will appear under the 'Activity' submenu of iTunes and you will be able to click on the binary to 'Select' it as the one you wish to release.
What's App Package For Zong
At this point you are ready to submit your app for review. With luck it will be approved and ready for sale!