---
title: "shouldArchiveValue(forKey:)"
framework: quartzcore
role: symbol
role_heading: Instance Method
path: "quartzcore/caemittercell/shouldarchivevalue(forkey:)"
---

# shouldArchiveValue(forKey:)

Returns a Boolean value indicating whether the value for a given key should be archived.

## Declaration

```swift
func shouldArchiveValue(forKey key: String) -> Bool
```

## Parameters

- `key`: The name of one of the receiver’s properties.

## Return Value

Return Value true if the specified property should be archived, otherwise false.

## Discussion

Discussion The default implementation returns true. This method is called by the object’s implementation of encodeWithCoder:.

## See Also

### Using Key-Value Coding Extensions

- [defaultValue(forKey:)](quartzcore/caemittercell/defaultvalue(forkey:).md)
