I programmatically created core data and programmatically filled it. How do I save this database in project now, so if I give my project to someone, he will get same database without using database creating and filling code?
Asked
Active
Viewed 58 times
0
-
1Check out [this question](http://stackoverflow.com/q/2230354/3985749) and associated answers. – pbasdf Feb 26 '15 at 16:27
-
Thank you, it really helps. Sorry, i can't accept your answer in comment) – Zaporozhchenko Oleksandr Feb 27 '15 at 14:11
1 Answers
0
The database saved is only locally. Even an uninstall would clear out all your data.
You either need look for other alternatives, or you can put your create code in an if check, something like this.
If(runningAppForTheFirstTime)
{
//Create your objects in coreData and save them
}

Shamas S
- 7,507
- 10
- 46
- 58