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

As part of a two-step analysis process, I need the data to be written to persistent storage before the start of the second step. If I do this asynchronously through notifications of the final grain, this is a little messy. It would be great if it worked on one line.

Is it possible to create Realm (). write {} opperations synchronous? In the second stage, you will need to read this data.

+2
source share
1 answer

Realm.write(_:) is synchronous.

+4
source

Source: https://habr.com/ru/post/1653726/


All Articles