     return true
   }
   
-  override func transformedValue(value: AnyObject?) -> AnyObject? {
+  override func transformedValue(_ value: Any?) -> Any? {
     guard let value = value else {
       return nil
     }
-    return NSKeyedArchiver.archivedDataWithRootObject(value)
+    return NSKeyedArchiver.archivedData(withRootObject: value)
   }
   
-  override func reverseTransformedValue(value: AnyObject?) -> AnyObject? {
+  override func reverseTransformedValue(_ value: Any?) -> Any? {
     guard let value = value as? NSData else {
       return nil
     }
-    return NSKeyedUnarchiver.unarchiveObjectWithData(value)
+    return NSKeyedUnarchiver.unarchiveObjectWithData(value as Data)
   }
 }

  static func registerAll() {
    let assetTransformer = CKAssetTransformer()
    let locationTransformer = CLLocationTransformer()
    NSValueTransformer.setValueTransformer(assetTransformer, forName: CKAssetTransformer.name)
    NSValueTransformer.setValueTransformer(locationTransformer, forName: CLLocationTransformer.name)
  }
}

class CKAssetTransformer: NSValueTransformer {
  static let name = "CKAssetTransformer"
  
  override class func transformedValueClass() -> AnyClass {

    return true
  }
  
  override func transformedValue(_ value: Any?) -> Any? {
    guard let value = value else {
      return nil
    }
    return NSKeyedArchiver.archivedData(withRootObject: value)
  }
  
  override func reverseTransformedValue(_ value: Any?) -> Any? {
    guard let value = value as? NSData else {
      return nil
    }
    return NSKeyedUnarchiver.unarchiveObject(with: value as Data)
  }
}

class CLLocationTransformer: ValueTransformer {
  static let name = "CLLocationTransformer"
  
  override class func transformedValueClass() -> AnyClass {
