Realm java has a function isValid() to check if a realm object is deleted/invalidated.
Is there a similar function to find it in realm swift?
I get 'Realm object has been deleted or invalidated' crash quite often, when updating those objects.
An object can no longer be accessed if the object has been deleted from the containing
realm
or ifisInvalidated
is called on the containingrealm
.
this is the Documentation of Object.isInvalidated
.
add
override var isInvalidated: Bool { return super.isInvalidated }
to your Object
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With