= “” dynamic var age: int = 0 dynamic var owner: Person? } class Person : RLMObject { dynamic var name = “” dynamic var saying = “” dynamic var dogs = RLMArray(objectClassName: Dog.className()) }
zero copy architecture bitpacking reduces memory usage up to 90% caching and vectorization makes it faster than native C universal data representation from multiple languages Photo by Natalie Lucier https://flic.kr/p/6vUu56
Realm as network cache for all data “I don’t have any plans to go back to Core Data anytime soon. I really like Realm” sebastiandobrincu.com www.beanflow.com
haven’t migrated anything yet, so oldSchemaVersion == 0 if (oldSchemaVersion < 1) { // Nothing to do! // Realm will automatically detect new properties and removed properties // And will update the schema on disk automatically } })
< 1 { // The enumerateObjects:block: method iterates // over every 'Person' object stored in the Realm file migration.enumerateObjects(Person.className()) { oldObject, newObject in // combine name fields into a single field let firstName = oldObject[@"firstName"] as String let lastName = oldObject[@"lastName"] as String newObject[@"fullName"] = “\(firstName) \(lastName)” } } })