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.