In my application, I dynamically create a data model on first run. Is there a way to save this data model so that I can access this model on subsequent launches of the application (for example, as a * .momd file)?
It doesn't look like there is a method that saves your model to a .momd file, but NSManagedObjectModel implements <NSCoding> , so you can use NSArchiver / NSUnarchiver to write the model to a file and read it later.
<NSCoding>
The best way to do this is to load the default dataset from another persistent store.
Just download the 1st chart from the permanent package repository, copy the objects to the document repository and save it.
Here you can find more inspiration: http://www.raywenderlich.com/980/core-data-tutorial-how-to-preloadimport-existing-data
Source: https://habr.com/ru/post/1389272/More articles:Is the rendering of the Chrome inline block (webkit?) Incorrect? How can I align this layout? - htmlPreference between the AVL tree and the 2-3 tree - data-structuresSize, resolution and quality guidelines for images - cssHow to add .a external library to Qt Creator project via graphical interface? - qtMinimizing jQuery code - javascriptLDAP in Django default admin - pythonHow to avoid using try ... catch in controllers? - try-catchHow to ensure atomicity of RMI operations? - javagraph of my imagination in R - map with the distance between the strips and the height of the rod - rSetting up LINQ dynamic query libraries - c #All Articles