<!--
{
  "availability" : [
    "macOS: 10.12.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSStatusItem/autosaveName-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSStatusItem(py)autosaveName"
  },
  "title" : "autosaveName"
}
-->

# autosaveName

A unique name for saving and restoring information about a status item.

```
var autosaveName: NSStatusItem.AutosaveName! { get set }
```

## Discussion

If you do not provide an autosave name for a status item, the system automatically chooses a unique name. Setting this property to <doc://com.apple.documentation/documentation/ObjectiveC/nil-227m0> resets it to the automatically chosen name.

Applications with multiple status items should set an autosave name after creating each item.

---

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)