Document-based app with multiple file type in Appkit

I'm trying to create an document-based app using AppKit. in the documentation is created a file called content that is the data model.

documentation says:

The Content object encapsulates the document’s data into a single package. Putting all of the document’s data into a single Content object simplifies data management. For example, it’s easier to add new data elements to the document later.

In my app I use two type of file:

  1. text file
  2. custom data type file

for the first the document's sample is perfect. but I have to use both files and in different time. e.g. because my app is an editor of text, when user write and click on save button, the app saves the content of file. but the user first of all create a project, give it a name and save the file project, like Xcode. So, how can I manage the crud of tow type of file?

Document-based app with multiple file type in Appkit
 
 
Q