NSTouchBar...is there a way to bring up the customize UI with a gesture (or something on the touch bar?)

To customize the touchbar, I see that in apps like Safari the way to do it is by going to the app's menubar and selecting View->Customize Touchbar.


Is there a way for the user to bring up this UI from the touch bar itself (or key equivalent) (a standard system recommended way?)

Replies

I see there is this property on NSApplication:

isAutomaticCustomizeTouchBarMenuItemEnabled


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:

toggleTouchBarCustomizationPalette


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:


31042889