0

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?

Zaporozhchenko Oleksandr
  • 4,660
  • 3
  • 26
  • 48

1 Answers1

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