Basic data: how to save a programmatically created object data model

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)?

+4
source share
2 answers

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

0
source

Source: https://habr.com/ru/post/1389272/


All Articles