You do not need a file main.swift. The main (heh) purpose of this file is to call NSApplicationMain(), the function that launches the Cocoa application. But, since every application should do this, Apple has added a less capable way of doing something.
Now you just need to mark the application delegate class with an attribute @NSApplicationMain. Then, Xcode will create the correct hooks so that your application runs in its main launch loop with an instance of the class you select as a delegate NSApp. New project templates do this, so you no longer need it main.swift. (It also frees you from having to assign an application delegate to the main bank, which is useful for applications using the OS X storyboard.)
, , , NSApplication, main.swift NSApplicationMain() . ( , @NSApplicationMain .)