Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 3391 [details]
Icon file which I created according to Apple's documentation
For my Xamarin.Mac application, in project setting page, I added the icon in 'Mac OS X Application' as written in http://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AppleHIGuidelines/IconsImages/IconsImages.html
But it does not seem to be showing that icon. I've attached the icon file.
I've also posted this on Xamarin.com forum and there jstedfast suggested to post the bug here.
Assuming you have a valid .icns file (if you're not sure, grab one from another .app to try), the correct procedure in Xamarin Studio for setting an application icon is:
- Add a .icns icon to the project's [blue] Resources folder
- Ensure the added .icns file's Build Action is 'BundleResource' (this should
be set for you simply by adding a file to the Resources folder)
- Go to Project Options > Build > Mac OS X Application
- Click the 'App Icon' button
- Select the .icns file under Project Folders > Resources
- Press OK
- Press OK on Project Options
- Observe application icon is set in OS X dock
FWIW, I've just fixed the App Icon button in the Info.plist editor to allow picking any *.icns file anywhere on the file system. If the file isn't already part of your project, it adds it to the project, too.
Mortaza: where does the icon not show? in the Info.plist editor/Project Options, or in the app itself when you run it?
I noticed while I was implementing the above feature that we were storing the icon name with the ".icns" file extension and it seems like Xcode doesn't do that, so I've updated the code to not save the ".icns" extension into the Info.plist file.
I've also fixed some logic for finding the icon file based on the plist name used in the info.plist, so this might have been the problem.
I'll try to look into this more tomorrow.
Mortaza: I created a new Xamarin.Mac project in Xamarin Studio and then opened the Info.plist, clicked the icon button in the "Mac OS X Application" section and selected the icon that you attached and it loaded fine.
I also tried it in the Project Options under "Mac OS X Application" and that worked as well.
The issue is like this: when I select in icon in 'Options > Build > Mac OS X Application' which is not in resources folder (but copied as content file), then despite the fact that it loads and displays the icon in 'Mac OS X Application' section, but when application runs, it will not show it in dock. But when the file is put in resources folder, it works.
Okay, so... the problem is that Apple expects the icon to be in MyApp.app/Content/Resources/ and not in a subdirectory of that.
That means that your icon file needs to live in the Resources folder in Xamarin Studio or else at the toplevel of the project (not in a subfolder).
Yes, that it. I think it needs to be reflected properly so that users (like me!) know how to set the icon properly.
Okay, I've just updated the code to warn the user that the icon needs to be in a toplevel Resources folder (or the toplevel project dir) when the user selects an icon.
If the user selects an icon that is already in the project, it offers to move it to the right place for them.
That would be great! Thanks.
no problem :-)
Today we have checked this issue with following builds:
X.S 4.0 - 2be9833ca58a68b3d64be96a40ab7e149647fed1
Mono- 2.10.11 (mono-2-10/2baeee2)
After setting .icns to App icon when we debug/run Xamarin.mac application, It displayed updated icon in Dock.
Changing the status to Verified.