<!--
{
  "availability" : [
    "macOS: 10.4.0 - 10.15.0"
  ],
  "documentType" : "symbol",
  "framework" : "Quartz",
  "identifier" : "/documentation/Quartz/QCPlugIn/setSerializedValue(_:forKey:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Quartz"
    ],
    "preciseIdentifier" : "c:objc(cs)QCPlugIn(im)setSerializedValue:forKey:"
  },
  "title" : "setSerializedValue(_:forKey:)"
}
-->

# setSerializedValue(_:forKey:)

Provides custom deserialization for patch internal settings that were previously serialized using the method [`serializedValue(forKey:)`](/documentation/Quartz/QCPlugIn/serializedValue(forKey:)).

```
func setSerializedValue(_ serializedValue: Any!, forKey key: String!)
```

## Parameters

`serializedValue`

The value to deserialize.

`key`

The key for the value to deserialize.

## Discussion

If your patch has internal settings that do not conform to the <doc://com.apple.documentation/documentation/Foundation/NSCoding> protocol, you must implement this method. After you deserialize the value, you need to call  `[self set:value forKey:key]` to set the corresponding internal setting of the custom patch instance to the deserialized value.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)