问题
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