How do I make a write operation in Realm (iOS) synchronous?

◇◆丶佛笑我妖孽 提交于 2019-12-12 18:40:51

问题


As part of an two step analysis process, I need data to be written to the persistent storage prior to the second step beginning. If I do this asynchronously via fina grain notifications its a bit messy. It would be great two do it in-line in one function.

Is it possible to make a Realm().write { } opperations synchronous? The second step will need to read this data back.


回答1:


Realm.write(_:) is synchronous.



来源:https://stackoverflow.com/questions/38082770/how-do-i-make-a-write-operation-in-realm-ios-synchronous

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