title: Fatal Error: use of unimplemented initializer 'init(realm:schema:)'
body: <h2>My Issue:</h2>
  
  <ul>
  <li>Yesterday, I updated my <code>Realm</code> framework from <code>0.91.5</code> to <code>0.92.0</code> for my project (written in Swift). I found that the Realm Team had already separated <code>Swift</code> part and <code>Objective-C</code> part from the previous entire Cocoa Framework, the team also change the syntax. And I already corrected my code as the latest Realm syntax, but I still got some trouble with <code>init()</code>.</li>
  </ul>
  
  <h2>The Error:</h2>
  
  <ul>
  <li>The Compiler thrown the error: <code>fatal error: use of unimplemented initializer init(realm:schema:) for CardModel</code>.</li>
  <li>The thing is this error did not occur with the previous version of <code>Realm</code>.</li>
  <li>I used <code>MultiPeer Connectivity</code> framework for project, which means I need to <code>Encode</code> and <code>Decode</code> for exchanging of data.</li>
  <li>I tried to change or add other <code>init()</code> to <code>CardModel</code>, but it did not work.</li>
  </ul>
  
  <h2>My Code:</h2>
  
  <pre><code>import RealmSwift
  
  class CardModel: Object {
  dynamic var cardID: String = ""
  dynamic var firstName: String = ""
  dynamic var lastName: String = ""
  dynamic var userImage = NSData()
  dynamic var status: String = ""
  dynamic var cardType: Int = 1
  dynamic var cardDate = NSDate()
  
  override init() {
      super.init()
  }
  
  init(coder aDecoder: NSCoder) {
      super.init()
      self.userImage = aDecoder.decodeObjectForKey("userImage") as! NSData
      self.cardID = aDecoder.decodeObjectForKey("cardID") as! String
      self.firstName = aDecoder.decodeObjectForKey("firstName") as! String
      self.lastName = aDecoder.decodeObjectForKey("lastName") as! String
      self.status = aDecoder.decodeObjectForKey("status") as! String
      self.cardType = aDecoder.decodeObjectForKey("cardType") as! Int
      self.cardDate = aDecoder.decodeObjectForKey("cardDate") as! NSDate
  }
  
  func encodeWithCoder(aCoder: NSCoder) {
      aCoder.encodeObject(self.userImage, forKey: "userImage")
      aCoder.encodeObject(self.cardID, forKey: "cardID")
      aCoder.encodeObject(self.firstName, forKey: "firstName")
      aCoder.encodeObject(self.lastName, forKey: "lastName")
      aCoder.encodeObject(self.status, forKey: "status")
      aCoder.encodeObject(self.cardType, forKey: "cardType")
      aCoder.encodeObject(self.cardDate, forKey: "cardDate")
    }  
  }
  </code></pre>
  
  <p><br></p>
  
  <p>Please teach me how to solve this problem.</p>
  
  <p>A big appreciation for your guide and time.</p>
  
  <p>Ethan Joe</p>