Synchronized Realm - Airplane Mode

2020-07-23 03:53发布

Can't find anything in the documentation about falling back to the locally cached version of a synchronized realm when eg. the App is started in airplane mode. Am I missing something?

3条回答
不美不萌又怎样
2楼-- · 2020-07-23 04:35

This is now open as a feature request with the Realm guys.

https://github.com/realm/realm-mobile-platform/issues/14

查看更多
欢心
3楼-- · 2020-07-23 04:37

Realm was sold to MongoDB in April 2019 at which point this issue was still outstanding. I would expect such to be tackled as part of integration of Realm's local store into a MongoDB cloud but never to be fixed in the core Realm Platform sync product.

查看更多
叼着烟拽天下
4楼-- · 2020-07-23 04:47

If the user did log in before (when the connection was available) you can use SyncUser.all() to get a valid authenticated user, but if no user exists a network call to the auth server is required.

We are working on adding support for creating a Realm and a User without initial network connection here: https://github.com/realm/realm-mobile-platform/issues/14

查看更多
登录 后发表回答