I see there is this property on NSApplication:
It doesn't seem to be enough.
The reason I'm interested in this is for a menubar app that doesn't show the application menubar, but uses the touchbar API, the user would be unlikely to figure out how to customize the touchbar. Will there be a gesture to do this?
I suppose I could try to add an additional button somewhere in my app's ui using the following method:
Though the documentation says this:
There is no need, and no API, for your app to know whether or not there is a Touch Bar available. Whether your app is running on a machine that supports the Touch Bar or not, your app’s onscreen user interface (UI) appears and behaves the same way.
This seems to leave a hole. If for example I put a button in my window that said "Customize Touchbar"...and the action would called toggleTouchBarCustomizationPalette...but what if the current device doesn't have a touch bar? Wouldn't I have to sniff for it, and hide that button?
The menu item is the only system standard method of invoking customization, so adding a button or any other within-window UI would be unusual for users.
But please file a radar for this with your use case.
I filed a bug on this: