4

I'm working on my first osx App and I want to save arrays of objects that I've created on a "project file" like you do in any program when using the "save" button.

I have been looking different ways to do it, Core Data, Document based app, but, I'm not sure how it works any of them to choose the best option for my app.

I want to save arrays of objects that have inside more arrays and other strings and doubles that contain information of the app that the user added. ( It can be a lot of data ) So for that reason I think Userdefault is not a good idea.

I also want to make the app able to open one of this projects saved.

So, could you help me to find which is the best way to do it?

Rafa Febrer
  • 184
  • 14
  • Related https://stackoverflow.com/questions/49177642/macos-swift-save-data-to-local-storage-best-practices and https://stackoverflow.com/questions/28628225/how-to-save-local-data-in-a-swift-app – zengr May 08 '20 at 17:41

1 Answers1

-2

I can suggest you to read iOS FileSystem Overview.

You must use the Data container to locate your local files. For this, you have to locate the NSDocumentDirectory with the NSUserDomainMask (call to NSSearchPathForDirectoriesInDomains) and use standard NSFileManager class.

Jean-Baptiste Yunès
  • 34,548
  • 4
  • 48
  • 69