Synchronized Realm - Airplane Mode

好久不见. 提交于 2019-12-09 19:25:43

问题


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?


回答1:


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




回答2:


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

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




回答3:


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.



来源:https://stackoverflow.com/questions/39942208/synchronized-realm-airplane-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!