I’m using JUCE 5.4.7 and using Mac OS X Catalina with XCode 11.3.1. I’m building a sandboxed app and trying to get the “Open Recent” menu to work. I’m using this line of code when the menu is created:
juce::MenuBarModel::setMacMainMenu(mainMenuModel.get(), &macAppMenu, TRANS(“Open Recent”));
When the app runs and the menu is created, I get the application menu (the one next to the Apple icon) and the “File” menu (under which the “Open Recent” menu is supposed to appear as a submenu), but nothing else. (The app has “File”, “Edit”, “Insert”, “View”, “Media” and “Help” menus but only the “File” menu shows.) Neither of the two menus opens up when I click on them (they are both empty). The app doesn’t crash and otherwise runs fine, with the exception that its app menu isn’t working.
If I remove the third argument to setMacMainMenu() everything works fine and all of our menus and submenus appear (but if I select a file from our own “Recent Files” menu that we wrote ourselves, the OS won’t let the app open the file). I’m also using RecentlyOpenedFilesList::registerRecentFileNatively() to register files that the user opens. I see a “RecentFilesMenuTemplate.nib” in my project directory and a little debugging showed me that it’s being loaded (juce_Mac_MainMenu.mm line 363 returns an NSNib* object). There are a few forum topics from 2012 about this but I can’t find any answers there.
Does anyone have any idea what I could be doing wrong?