title: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFTimer encodeWithCoder:]
body: <p>Is there anyway that i can save an NSTimer to <code>UserDefaults</code> and <code>NSKeyedUnarchiver</code> and use it later ? Below is my example code</p>
  <pre><code>  static var timerDictionary : [String:Timer]? {
      get{
          let outData = UserDefaults.standard.data(forKey: &quot;timerDictionary&quot;) ?? Data()
          if let dict = NSKeyedUnarchiver.unarchiveObject(with: outData) as? [String:Timer]?{
              
              return dict
          }else{
              return [:]
          }
          
      }
      set{
          let data = NSKeyedArchiver.archivedData(withRootObject: newValue ?? [:])
          UserDefaults.standard.set(data, forKey: &quot;timerDictionary&quot;)
      }
  }
  </code></pre>
  <p>However my app crashes with <code>'NSInvalidArgumentException', reason: '-[__NSCFTimer encodeWithCoder:]</code>.</p>