Hey all,
Firstly, I'd like to thank you for creating such a useful tool. I've been using electron-packager to pack my MacOS application for a while. Nowadays, I'm in the process of submitting the app to the App Store. But I'm facing with an issue about the icons. When I upload the app to the iTunes Connect for the App Store, the icon for the App Store doesn't seem neat. It seems like having some alpha blending issues. I couldn't find any related issue, article, Q&A, or post on the internet. If it exists somewhere, I'm sorry for taking the readers' time.
After investigating the issue, I've realised a note on the Human Interface Guidelines for MacOS Applications. There is a note as below;
Don't provide app icons in ICNS or JPEG format. Add de-interlaced PNG files in the app icon fields of your Xcode project's asset catalogue.
But according to the README file, we're supposed to use .icns for MacOS builds. I guess it causes some problems with iTunes Connect when we want to use some transparent background in the icons. We're suggested to add icons in the Xcode by using AppIcon part of the app. Is there any way to implement this in electron-packager? As far as I know, we can't open the electron project folder in Xcode and make some changes.
I'd like to hear any idea, opinion.
As a workaround, we had to put a solid background to the biggest two icons which are 512x512 and 512x512@2x.
馃憢 Thanks for opening your first issue here! If you have a question about using Electron Packager, read the support docs. If you're reporting a 馃悶 bug, please make sure you include steps to reproduce it. Development and issue triage is community-driven, so please be patient and we will get back to you as soon as we can.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
macOS is not my area of expertise, so I would need to know what file types are allowed for CFBundleIconFile, which is what we're using to set the icon.
Also, it's not obvious to me that you can use multiple files.
Since the original issue reporter has not responded to the request for additional information in about two weeks, it's assumed that they either found the answer in another manner or decided not to pursue this issue. If this is incorrect, they can respond with answers to the questions posed, and this issue can be reopened.
CFBundleIconFile is marked as legacy here.
Don't provide app icons in ICNS or JPEG format. Add de-interlaced PNG files in the app icon fields of your Xcode project's asset catalogue.
The quote above is mentioned in this page
In Xcode, we have a section for AppIcon (Assets.xcassets). Here, we can add multiple png files. I've attached a screenshot of the screen. But as far as I see, this section doesn't create a .icns file as a result. So I believe we should improve the way that we're using to add app icons.
But since also I'm not an expert about this, I don't have any way to achieve this through electron.
Besides that, there is another thing confusing me. CFBundleIconFile is mentioned with an additional info which is "_Use the CFBundleIcons or CFBundleIconFiles keys instead. See CFBundleIconFile for details._". The confusing part is that they don't seem supporting MacOS as a platform. Are we supposed to use them still!?
AppIcon section;

Right, it seems that the deprecation is only for iOS/watchOS, not macOS. Perhaps Apple is calling macOS legacy _(which wouldn't surprise me since I remember hearing that they absorbed the macOS dev team into the iOS team...)_.
It would help to know what the resulting Info.plist looks like when you use multiple .pngs in a macOS project.
Since the original issue reporter has not responded to the request for additional information in about two weeks, it's assumed that they either found the answer in another manner or decided not to pursue this issue. If this is incorrect, they can respond with answers to the questions posed, and this issue can be reopened.
I couldn't find anything related to that in Info.plist. We have ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; as a build setting in project.pbxproj. AppIcon is a folder name and its path is <projectRoot>/Assets.xcassets/AppIcon.appiconset.
Anyone have successfully generate the icns icon? I can't make it either :(
Here is what I have done
electron-packager . --platform=darwin --overwrite --icon=build/icon.icns --purne=true
Given the lack of evidence, I'm going to close this issue. If someone can show me a proof-of-concept minimal bundled Electron app that can have multiple PNG files instead of an ICNS file on macOS, I will gladly reopen this issue so we can figure out how to integrate that into Electron Packager.
@dotku Hi, you can follow https://github.com/onmyway133/IconGenerator