© Jesse Feiler 2019
Jesse FeilerImplementing iOS and macOS Documents with the Files Apphttps://doi.org/10.1007/978-1-4842-4492-0_5

5. Implementing Documents on macOS: NSDocument

Jesse Feiler1 
(1)
Plattsburgh, NY, USA
 
The heart of documents on macOS is the NSDocument class. Like UIDocument in iOS, it is an abstract class that you subclass for your own app. Three classes interact to provide document functionality in your app. They are the following:
  • NSDocument is the abstract class that you subclass for your app.

  • NSDocumentController is the app-specific class that manages the opening and closing of your document.

  • NSWindowController is the class that manages the window in which your document is displayed.

There isn’t a one-to-one mapping of these classes ...

Get Implementing iOS and macOS Documents with the Files App: Managing Files and Ensuring Compatibility now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.