I am writing a document-driven Cocoa app for which I want to create a special "command-line mode" which will not launch any windows and requires no user interaction.
This thread from 2010 asks the same question, but for older Cocoa projects that included a main.m file. Is it possible to do this for a modern Cocoa app that uses only Swift and thus does not have a main.m?