<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindow/setFrameAutosaveName(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSWindow(im)setFrameAutosaveName:"
  },
  "title" : "setFrameAutosaveName(_:)"
}
-->

# setFrameAutosaveName(_:)

Sets the name AppKit uses to automatically save the window’s frame rectangle data in the defaults system.

```
func setFrameAutosaveName(_ name: NSWindow.FrameAutosaveName) -> Bool
```

## Parameters

`name`

The name to use for the window’s frame rectangle.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the specified name is acceptable and another window isn’t already using it; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

---

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)