Thanks for nativefier, it's very useful.
The tray icon on mac os is not displayed.


nativefier https://app.asana.com ; I've also tried nativefier https://app.asana.com --icon ~/Downloads/asana.icns --tray ; it makes no difference.7.6.7v8.11.3macOS High Sierra 10.13.6Not a fix, however, I believe I found the issue. It has to do with the function getAppIcon() in helpers.js where it is looking for a 'icon.png' (OSX) and that file isn't created by the Icon functions.
In trayIcon.js, it gets the iconPath from;
const iconPath = getAppIcon();
which is calling helpers.js;
function getAppIcon() {
return path.join(__dirname, '../', `/icon.${isWindows() ? 'ico' : 'png'}`);
}
Which says to get the icon.png file one directory up from the final build 'main.js'.
If I manually put a 'icon.png' in the XX.app/Contents/Reources/app directory and then relaunch the app, it works.
@dvbii feeling you're right, but I put an image there and doesn't work.
Maybe the image needs to have a specific dimension?
On the other hand, why not make this file configurable as flag?
nativefier -n Twitter --fast-quit --single-instance --tray twitter.png "https://m.twitter.com"
Yes, I had to make the image 90pixels x 90 pixels. Then had to name it icon.png. Definitely agree it should either be a flag or at least add to the function that makes the icons to auto create this icon.png and put it where it needs to go. Or change the reference to where it is looking for it.
Using the optional imagemagick suite for resizing if needed would also be nice.
Or even using --icon (or the site favicon) as a default image.
Hi everybody. I recently released Nativefier 8.0.4, which revamps and upgrades lots of things. I don't have a Mac to re-test this, can one of you tell me if this is still an issue with 8.0.4? Thanks.
I tried 8.0.4 but I'm unable to even create the app:
$ ./node_modules/.bin/nativefier \
--internal-urls='^((?!/pattern/).)*$' \
--fast-quit \
--single-instance \
--icon=headshot.png \
--min-width=240 \
--min-height=180 \
http://my-web-page/
/path/to/node_modules/nativefier/lib/build/buildNativefierApp.js:39
async function copyIconsIfNecessary(options, appPath) {
^^^^^^^^
SyntaxError: Unexpected token function
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/dp/tools/native-jenkins-monitor/node_modules/nativefier/src/main.ts:3:1)
I'm not sure if I'm doing something wrong, but I've moved on from nativefier so I'm not really invested in putting a lot of effort into debugging.
Most helpful comment
Yes, I had to make the image 90pixels x 90 pixels. Then had to name it icon.png. Definitely agree it should either be a flag or at least add to the function that makes the icons to auto create this icon.png and put it where it needs to go. Or change the reference to where it is looking for it.