---
title: "setSerializedValue(_:forKey:)"
framework: quartz
role: symbol
role_heading: Instance Method
path: "quartz/qcplugin/setserializedvalue(_:forkey:)"
---

# setSerializedValue(_:forKey:)

Provides custom deserialization for patch internal settings that were previously serialized using the method serializedValue(forKey:).

## Declaration

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

## Parameters

- `serializedValue`: The value to deserialize.
- `key`: The key for the value to deserialize.

## Discussion

Discussion If your patch has internal settings that do not conform to the 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.

## See Also

### Supporting Saving and Retrieving Internal Settings

- [serializedValue(forKey:)](quartz/qcplugin/serializedvalue(forkey:).md)
