I have built a simple command line program with Xcode, and I would like to access the NSEvent.addGlobalMonitorForEvents method. It seems like the program must be trusted for this to work.
self.monitor = NSEvent.addGlobalMonitorForEvents(matching: NSEventMask.mouseMoved, handler: { e in
print(e)
})
How can I add a command line program to the list of trusted applications?