サンプルでは以下のようになっています。 // Person model class Person: Object { dynamic var name = "" dynamic var birthdate = NSDate(timeIntervalSince1970: 1) } // Create a Person object let author = Person() author.name = "David Foster Wallace" // Get the default Realm let realm = Realm() // You only need to do this once (per thread) // Add to the Realm inside a transaction realm.write { realm.add(author) } しかし、以下の行が
![Swift 2とRealmSwiftでコンパイルエラー: Call can throw, but it is not marked with 'try' and the error is not handled](https://cdn-ak-scissors.b.st-hatena.com/image/square/f6bc393cd0b6bd2196935e603c5d031bd6ca6699/height=288;version=1;width=512/https%3A%2F%2Fcdn.sstatic.net%2FSites%2Fja%2FImg%2Fapple-touch-icon%402.png%3Fv%3D1cfb10b305ca)