I have a menu bar app on macOS that gives shortcuts to some workflows. I want one of the buttons in this app to create a new terminal window which automatically runs a kubectl
command. For example the user gets a terminal window as if they have ran that command by themselves.
I have figured that you can run terminal commands using Process()
class. However, it doesn't create a new terminal window. Moreover, it terminates after command is done. I want something that stays open and yields to control to the user after it runs the initial command.
Does anyone know how this could be done? Do I need certain app permissions to do this?
My deployment target is 10.15 and Xcode 9.3 compatible.