Adding Menu Items to Cocoa Application’s Main Menu Programatically

I cannot find a way to add menu items to Cocoa application's main menu programatically. In Cocoa developer documentation, I find only removing items programmatically. Eventually, I added menu items in Interface Builder of XCode and control them from code.


Cocoa app failed to write to user defaults

Yesterday, while doing a screen recording, I noticed that my cocoa apps couldĀ no longer write to user defaults to save preferences. I tested the same apps on another version of OS X 10.9 and they worked fine. I restarted my Mac and they work again. Just before that, I deleted user defaults in username/Library/Containers/<app>. I … Continue reading Cocoa app failed to write to user defaults