如何从服务器获取Realm? [英] How to get Realm from the server?

查看:208
本文介绍了如何从服务器获取Realm?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否无法从服务器获取Realm?

我试过了,但是没用.

var url = "http://address/default.realm"
var rlm = RLMRealm(path: url)

错误消息显示'No such file or directory'.

解决方案

这种方式不支持您尝试的内容.

如果要在服务器端使用Realm来播种数据库,则需要先下载它,然后将其保存到设备的本地文件系统中,以便从那里进行加载.

如果您想在设备与服务器之间或在多个设备之间同步数据,那么您可能会对这是一项我们正在努力的功能感兴趣.订阅此问题以了解其当前阶段. >

Is it impossible to get Realm from the server?

I tried this, but it doesn't work.

var url = "http://address/default.realm"
var rlm = RLMRealm(path: url)

Error message says 'No such file or directory'.

解决方案

What you're trying isn't supported in this way.

If you want to use a Realm on the server side to seed your database, you would need to download it first and save it to the local filesystem of the device to load it from there.

If you want to sync data between the device and your server or across multiple devices, then you may be interested that this is a feature, on which we are working on. Subscribe this issue to keep up-to-date about it's current stage.

这篇关于如何从服务器获取Realm?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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