I have an application that requires authentication. Before the user authenticates only a subset of menu items is present in the menu bar. After the user has successfully authenticated I replace the application’s main menu with [NSApp setMainMenu:aMainMenu];
Unfortunately this removes the Spotlight For Help menu item that allows the user to search for menu items and inside the help book. The menu item is present before I replace the main menu.
How can I get the Spotlight For Help menu item back without replacing specific menu items instead of the whole main menu?
When you resetting your main menu, do it without your new help menu built in. Keep that part separate...
... because after resetting your main menu, you will also need to reset your help menu via [NSApp setHelpMenu:];
(and I've linked Apple's documentation for you). That is what will reinstall Spotlight for Help.