How can I hide the Dock icon on MacOS? Info.plist
not working
#13568
-
I have read that I need to set After testing this, I noticed that the Info.plist has no effect on the app. No matter what I set CFBundleName and/or CFBundleDisplayName to, the app retains the name I assigned in app.axaml. This should not be the case according to this discussion (#9346). What am I doing wrong? Here is the structure of the app: The .Avalonia project is for the UI; here, I have also assigned the name in the app.axaml file, and .Avalonia.MacOS for all platform-specific aspects. I created the Info.plist in the MacOS project. contents of the Info.plist: <dict>
<key>CFBundleDisplayName</key>
<string>Hallo</string>
<key>CFBundleExecutable</key>
<string>IBI.aws.Avalonia.MacOS</string>
<key>CFBundleIdentifier</key>
<string>com.myapp.macos</string>
<key>CFBundleName</key>
<string>MyApp</string>
<key>LSUIElement</key>
<true/>
<key>MonoBundleExecutable</key>
<string>IBI.aws.Avalonia.MacOS.exe</string>
</dict> Even when I publish the app and customize the Or is there another way to hide the Dock icon without using |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 11 replies
-
It has, if Info.plist is assigned right, it should work with Avalonia app just like with any other .NET app, there is zero difference. The only non-standard thing that Avalonia does with the app title - is setting app title in runtime via changing process name. It might change dock tile name as well, but not in the applications list I suppose. Also should affect the icon. I can't help what's exactly wrong with LSUIElement though. |
Beta Was this translation helpful? Give feedback.
-
Here's what I found out so far: I created a new Avalonia Desktop project on Windows. I cloned it on Mac and executed First change in the project: For my application, I need a project with the TFM However, if I create a .Net Mac App project on Mac, which also has Can someone explain why Avalonia + I'm new to programming and don't have much experience, so I would appreciate any hints on what I might be doing wrong. I'm really desperate... Thanks in advance. |
Beta Was this translation helpful? Give feedback.
If I am reading all the code correctly, yes. I however still have no Mac to test on or any real experience programming for Macs.
Avalonia allows for setting a bunch of platform specific options during Launch. Typically you do something like