Kiwo Tew
Kiwo Tew

Reputation: 1531

swift iOS is there a fast way to populate a realm database

I decided to try realm

In my app users can select a category and a sub-category (one-to-many) and I decided to get the data from realm.

Right now I have my relational data in a sql file.

But is there a way to populate a realm database? I can't really see anything in the docs.

And also, is it a bad idea to use realm for read-only?

Upvotes: 0

Views: 470

Answers (1)

segiddins
segiddins

Reputation: 4120

You can create a pre-populated Realm file that you either ship with your app or download on the fly, or you can parse the responses from your REST API into objects that can be added to the Realm.

Upvotes: 1

Related Questions