同步领域-飞行模式 [英] Synchronized Realm - Airplane Mode

查看:72
本文介绍了同步领域-飞行模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,在文档中找不到有关回退到同步领域的本地缓存版本的任何信息.该应用程序以飞行模式启动.我想念什么吗?

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?

推荐答案

如果用户以前曾经登录过(当连接可用时),则可以使用SyncUser.all()来获取有效的经过身份验证的用户,但是如果没有用户存在,必须通过网络呼叫身份验证服务器.

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.

我们正在努力增加对在没有初始网络连接的情况下创建Realm和User的支持:

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

这篇关于同步领域-飞行模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆