Suppressing automatic opening of last file used

I've been struggling with how to get cocoa to not automatically open the last document that was opened in the app. Seems that there is no obvious way to control the creation of save state for the app in swift. My current work-around is to use the following in my app delegate:

func application(_ app: NSApplication, willEncodeRestorableState coder: NSCoder) {
	coder.failWithError(err())
}

This works, but seems inelegant.

Suppressing automatic opening of last file used
 
 
Q