<!--
{
  "documentType" : "article",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/keyed-archiver-root-object-key",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Keyed Archiver Root Object Key"
}
-->

# Keyed Archiver Root Object Key

Keys that the archiver uses in the hierarchy of encoded objects.

## Topics

### Constants

[`NSKeyedArchiveRootObjectKey`](/documentation/Foundation/NSKeyedArchiveRootObjectKey)

Archives created using the class method [`archivedData(withRootObject:)`](/documentation/Foundation/NSKeyedArchiver/archivedData(withRootObject:)) use this key for the root object in the hierarchy of encoded objects. The [`NSKeyedUnarchiver`](/documentation/Foundation/NSKeyedUnarchiver) class method [`unarchiveObject(with:)`](/documentation/Foundation/NSKeyedUnarchiver/unarchiveObject(with:)) looks for this root key as well.



---

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)