0

I am working on turning an web app into an iOS app.

They both use the same backend/restAPI.

My question now is: Does core data have any function that makes it possible to pre populate my ios apps "database" ?

I have a few sql files with relational tables (one-to-many) that I would want to get in my app.

Eg, state/city, category/sub-category.

So is there a way to get the data form my sql file into the ios app?

I would want to build/ship the app with the data already there, instead of making an API call and then store the data.

Thanks

rmaddy
  • 314,917
  • 42
  • 532
  • 579
user2722667
  • 8,195
  • 14
  • 52
  • 100

1 Answers1

1

Do you really need Core Data? If all you need is access to your relational data, I'd create a SQLite database from your SQL dumps on your PC. Then you can include that file in your app's bundle during the "Copy Resources" step. SQLite is available on iOS, so you'd be good to go.

MattD
  • 380
  • 1
  • 15
  • Since I am new to ios dev I had no idea that SQLite was supported. I am only going to display the data in table view so I guess I dont need core data then – user2722667 Aug 16 '15 at 14:27