Adding NSTouchBar support after main window has been created
问题 I'm trying to add support for exposing NSTouchBar buttons via a plugin to an application that I cannot otherwise modify. The plugin, a shared library, is loaded at runtime after the main window has been created. I've created an AppDelegate as follows: @interface AppDelegate : NSResponder <NSTouchBarDelegate> @end With an @implmentation that implements the makeTouchBar and touchBar functions: - (NSTouchBar *) makeTouchBar - (nullable NSTouchBarItem *) touchBar:(NSTouchBar *)touchBar