This is a followup question to a previous post I wrote here: Can't use anything other than default.realm with SwiftUI - #2 by Jay
The setup is that I have a development.realm
that I use for development, and a default.realm
that I use when I open the app not during development.
Following @Jay response I managed to get things updated in the development.realm
, which I wasn’t doing properly before.
The problem now is that I have a bunch of views reading from the realm, and they all seem to be using default.realm
.
My code looks something like this:
import RealmSwift
struct MyView: View {
// var realm = RealmService.shared.realm // I tried adding this, just to test, but it didn't work
@ObservedResults(SomeObject.self, where: {$0.isValid}) var validObject
// ...
}
I guess I must be missing some initialization somewhere, but I have no clue where that could be. I’ve already gone through this other conversation, but it didn’t help my solve it: How do you change the default configuration for @ObservedResults()? - #12 by Jay
Thanks!