Try specifying a .xib for the "Main nib file name'
I did this some time ago, and it works fine for me. Something like this:
- New monomac project
Created an 'AppController' class in C#:
[Register("AppController")] public partial class AppController : NSObject { public AppController() { } public override void AwakeFromNib() { var statusItem = NSStatusBar.SystemStatusBar.CreateStatusItem(30); statusItem.Menu = statusMenu; statusItem.Image = NSImage.ImageNamed("f3bfd_Untitled-thumb"); statusItem.HighlightMode = true; }
In MainMenu.xib, I deleted the application menu
- In MainMenu.xib, I added an custom object and set it's type to
AppController
- I created my status menu in the .xib and then connected it to the
AppController
with an outlet - In info.plist, I add the "Application is agent (UIElement)" value as a string and set it to "1"
Try it out with a .xib. If it doesn't work, maybe I can share my project for you to take apart.