2

I'm trying to create a proxy app to provide touchbar functionality for an existing closed source app. I am able to communicate with the app through an api, but my touchbar disappears when it's not focused.

In the NSTouchBar documentation it says:

On supported MacBook Pro models, the Touch Bar, above the keyboard, shows instances of the NSTouchBar class from the front-most app.

However, I am wondering if there is a way to force which touchbar is being displayed. I tried to not resign, which works somewhat, but then I lose focus from the application.

func applicationWillResignActive(_ notification: Notification) {
    self.activate(ignoringOtherApps: true) 
}
Sharph
  • 83
  • 1
  • 7

2 Answers2

0

I think you found the answer by yourself. The Touch Bar is designed to only show app-specific controls.

From the Apple Human Interface Guidelines:

The Touch Bar […] is a Retina display and input device that provides dynamic interface controls for interacting with content on the main screen. These controls offer quick access to system-level and app-specific functionality based on the current context.

alexkaessner
  • 1,966
  • 1
  • 14
  • 39
0

touchbar-photo

BetterTouchTool can do this. The question is how?

stpoa
  • 5,223
  • 2
  • 14
  • 26