How to get Realm from the server?

試著忘記壹切 提交于 2019-12-13 08:11:53

问题


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'.


回答1:


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.



来源:https://stackoverflow.com/questions/28406259/how-to-get-realm-from-the-server

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