Reputation: 4795
I want my app to ship out with a pre-initialized DB.
In SQL, I would create a DB, do the necessary inserts, pg_dump to a file, and load from that file. I'm sure Realm has an equivalent method, but I'm not sure what it is and I couldn't find it in the documentation.
Upvotes: 2
Views: 752
Reputation: 15991
(Disclaimer: I work for Realm)
There's no pg_dump-like functionality in Realm, but you can distribute a pre-built Realm file along with your app and that'll work just fine. :)
At the moment, the best way to create a pre-made Realm file is to simply make a small sample app to generate and then populate the file, but we're working on adding that functionality to Realm Browser as well.
Upvotes: 2