title: Best Way to Build a Pre-Filled Realm Database
body: <p>My app (iOS) will have a ton of data built in (and not synced to a server). I know I can <a href="https://stackoverflow.com/questions/36638323/swift-realm-load-the-pre-populated-database-the-right-way">take a pre-filled realm database and copy it over when the app is first used</a>, but what I don't know is: <strong>What is the best way to build that pre-filled database?</strong></p>
  
  <p>Should modify my app, to statically create the realm database, by hardcoding all the objects and relations, then pull the database from the emulator:</p>
  
  <pre><code> let car1 = Car(color: "red")
   ...
   let car230 = Car(color: "blue")
  
   ...
   try realm.write{
      realm.add(car1)
      ...
      realm.add(car230)
   }
  </code></pre>
  
  <p>Or is there a saner approach to this?  </p>