Sometimes you’d like to create multiple Realms in one app. You might need a Realm to hold “drafts” of documents. The documentation doesn’t really explain this very well and is a bit hard to find. I’m currently using the version 2.4.3.

Just to go over the basics. This is how to create a default Realm. Most app’s don’t really need to use mulitple Realms

Creating another Realm that’s not the default one is a bit trickier

## Caveats

You can’t share objects between two realms.

If you have an object like so you cannot share them between two realms. They need to be seperate instances of eachother.

This is a nono!

#### Solution: Use the value intializer

Document(value: fetched) creates a copy of the Document instance. It’s a copy and is not attached to defaultRealm context. It’s floating an in memory. You can then write it to a different realm.