Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App icon missing/blank in MacOS ARM64 build #1279

Closed
1 of 3 tasks
ayushmanchhabra opened this issue Oct 20, 2024 · 3 comments · Fixed by #1302 or #1297
Closed
1 of 3 tasks

App icon missing/blank in MacOS ARM64 build #1279

ayushmanchhabra opened this issue Oct 20, 2024 · 3 comments · Fixed by #1302 or #1297
Assignees

Comments

@ayushmanchhabra
Copy link
Collaborator

ayushmanchhabra commented Oct 20, 2024

Issue Type

  • Bug Report
  • Feature Request
  • Other

Current/Missing Behaviour

https://stackoverflow.com/questions/79106055/nw-js-nw-builder-not-displaying-icon-on-macos-arm64-demo-project
Refer to this Stack Overflow thread.

Expected/Proposed Behaviour

App icon should not be missing/blank.

Additional Info

@ayushmanchhabra
Copy link
Collaborator Author

@me-vlad-k Will look into this soon

@ayushmanchhabra ayushmanchhabra changed the title App icon missing in MacOS ARM64 build App icon missing/blank in MacOS ARM64 build Oct 20, 2024
@me-vlad-k
Copy link

@ayushmanchhabra I found a solution to this 'issue'.

The problem was with the .icns file itself. I had found a dummy icon somewhere on the web, and since it was created incorrectly, it caused this weird behavior.

For someone who may struggle with the same issue:

Make sure to create your .icns file correctly before you start gasping in panic—it's very important! 😄 When using an app to create a .icns file, you should start with a 1024x1024 PNG file to ensure everything looks sharp on Retina displays. If you somehow miss some icon dimensions, such as 64x64 or others, macOS will display blank icons instead of the missing ones.

There are many apps available on the web that can create .icns files for you. A few examples are iLove Icns Creator, Image2Icon, and many others, including command-line utilities.

I also removed the "icon": "./src/icon.png" from the NW.js manifest, as it doesn't seem to play any role in displaying an icon for macOS.

I updated my repo nwbuilder-demo and uploaded the new .icns file. I tested how the app is being built, and everything works for ARM64. I'll continue to tweak other settings and see what I can achieve.

@ayushmanchhabra
Copy link
Collaborator Author

To prevent this from happening in the future, we should maybe check the file headers to see if its the correct image type and throw error on invalid type.

@ayushmanchhabra ayushmanchhabra self-assigned this Nov 7, 2024
ayushmanchhabra pushed a commit that referenced this issue Nov 21, 2024
🤖 I have created a release *beep* *boop*
---


##
[4.12.0](v4.11.6...v4.12.0)
(2024-11-21)


### Features

* **run:** return NW.js process reference
([#1304](#1304))
([bd2f926](bd2f926))


### Bug Fixes

* miscellaneous quality of life improvements
([#1296](#1296))
([a82c140](a82c140))
* **util:** validate options.* correctly
([#1298](#1298))
([3034f5c](3034f5c))
* **util:** validate options.app.* values
([#1302](#1302))
([4f388a9](4f388a9)),
closes [#1279](#1279)
[#1293](#1293)


### Chores

* **deps-dev:** bump the npm group across 1 directory with 6 updates
([#1301](#1301))
([56c1192](56c1192))
* **deps:** bump cross-spawn from 7.0.3 to 7.0.6
([#1305](#1305))
([2803af3](2803af3))
* **deps:** bump davelosert/vitest-coverage-report-action from 2.6.0 to
2.7.0 in /.github/workflows in the gha group
([#1295](#1295))
([23aaad8](23aaad8))
* **deps:** bump davelosert/vitest-coverage-report-action from 2.7.0 to
2.8.0 in /.github/workflows in the gha group
([#1303](#1303))
([ceaf348](ceaf348))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants