I have implemented Realm.asyncOpen and it is working fine, I’m able to receive and sync data to my server.
I just tested the scenario, when an already logged in user try to start my app without Internet connection and I got an error.
Only 1 user can access one time my app, so in the AppDelegate I check for SyncUser.all. There is the saved user, so I try to async open a realm with this stored user. I got error logs (Failed to connect to endpoint ‘127.0.0.1:9080’: Connection refused) - thats great, because the server is unreachable without internet.
The problem is that the Realm.asyncOpen call doesnt return anything in this scenario.
The “let realm = try! Realm(configuration: config)” returns, but i got an empty realm (realm.isEmpty = true).
Am i wrong? How can i open a synced realm offline?