Realm object has been deleted or invalidated
You can check if an object has been deleted from the Realm by calling object.invalidated — if it returns true, then it has been deleted or the Realm has manually invalidated.
You can check if an object has been deleted from the Realm by calling object.invalidated — if it returns true, then it has been deleted or the Realm has manually invalidated.
You should override your kindEnum‘s setter and getter for this case: enum Kind: String { case CheckedIn case EnRoute case DroppedOff } class Checkin: Object { @objc dynamic var id = 0 var kind = Kind.CheckedIn.rawValue var kindEnum: Kind { get { return Kind(rawValue: kind)! } set { kind = newValue.rawValue } } }
Realm A relatively fast and convenient library, all links are simply implemented, which is related to the object orientation of the database. Excellent documentation. Is, perhaps, one of the best option for storing data on a mobile device at the moment, the minus can only be an increase in the size of the apk-file by … Read more
(Disclaimer: I work for Realm. I’ve left Realm now, but I’m still happy to help!) 🙂 Thanks a lot! It’s great to hear you’re enjoying Realm! Multiple Realm Instances – You don’t need to worry about this at all! A Realm file object is created upon the first-time instantiation on each thread, and that same … Read more
Currently the Realm Browser doesn’t support accessing databases directly on the device, so you need to copy the database from the emulator/phone to view it. That can be done by using ADB: adb pull /data/data/<packagename>/files/ . That command will pull all Realm files created using Realm.getInstance(new RealmConfiguration.Builder().build()) . The default database is called default.realm. Note … Read more
Weird, the answer is very straightforward. Here is how I do it: let array = Array(results) // la fin
Finding a Realm File For Android How to view my Realm file in the Realm Browser? For iOS If your App is on Device Make sure that your device is connected and go to the devices window in the Xcode menu Window > Devices (⌘⇧2). There you will be able to choose your device and … Read more