<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.6.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuartzCore",
  "identifier" : "/documentation/QuartzCore/CAEmitterCell/shouldArchiveValue(forKey:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Animation"
    ],
    "preciseIdentifier" : "c:objc(cs)CAEmitterCell(im)shouldArchiveValueForKey:"
  },
  "title" : "shouldArchiveValue(forKey:)"
}
-->

# shouldArchiveValue(forKey:)

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

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

## Parameters

`key`

The name of one of the receiver’s properties.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the specified property should be archived, otherwise <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

The default implementation returns <doc://com.apple.documentation/documentation/Swift/true>. This method is called by the object’s implementation of `encodeWithCoder:`.

---

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)