-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
When working with frozen objects, it often happens that you need to convert them back into live objects (this comes up every time you need to modify them, or just make sure that you have the latest version).
Today you can do that by first creating a ThreadSafeReference and then using realm.resolve() to get the live object:
realm.resolve(ThreadSafeReference(to: frozenItem))
This works, but it is not documented anywhere, and not very intuitive to a casual developer. It would be nice if we could have an overload of the resolve method that worked on a frozen objects directly, so it would instead just be:
realm.resolve(frozenItem)