I have a document-based application designed to process existing documents, not create new documents.
How can I prevent an application from creating a new blank document at startup by opening it from Finder?
There is an NSApplication delegate protocol method that you can implement.
- (BOOL)applicationShouldOpenUntitledFile:(NSApplication *)sender { return NO; }
Here's the documentation
Depending on what you are doing specifically, you can override newDocument: or applicationOpenUntitledFile: or else stop the user from calling him through the File-> New menu.
, ShouldOpenUntitledFile: , .