---
title: "setFrameAutosaveName(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nswindow/setframeautosavename(_:)"
---

# setFrameAutosaveName(_:)

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

## Declaration

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

## Parameters

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

## Return Value

Return Value true if the specified name is acceptable and another window isn’t already using it; otherwise, false.

## See Also

### Managing Window Frames in User Defaults

- [removeFrame(usingName:)](appkit/nswindow/removeframe(usingname:).md)
- [setFrameUsingName(_:)](appkit/nswindow/setframeusingname(_:).md)
- [setFrameUsingName(_:force:)](appkit/nswindow/setframeusingname(_:force:).md)
- [saveFrame(usingName:)](appkit/nswindow/saveframe(usingname:).md)
- [frameAutosaveName](appkit/nswindow/frameautosavename-swift.property.md)
- [NSWindow.FrameAutosaveName](appkit/nswindow/frameautosavename-swift.typealias.md)
- [frameDescriptor](appkit/nswindow/framedescriptor.md)
- [setFrame(from:)](appkit/nswindow/setframe(from:).md)
- [NSWindow.PersistableFrameDescriptor](appkit/nswindow/persistableframedescriptor.md)
