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

# defaultDraftName()

Returns the default draft name for the document subclass.

```
func defaultDraftName() -> String
```

## Discussion

The default implementation of this method returns the string “Untitled”, as adjusted according to the user’s specified locale. Your app should typically return a name that describes the kind of document. For example, a spreadsheet app could return “Spreadsheet”. A document created from a template could return the name of the template, for example, “Résumé”.

When a document has not yet been assigned a name, and has not yet been autosaved with the [`NSDocument.SaveOperationType.autosaveAsOperation`](/documentation/AppKit/NSDocument/SaveOperationType/autosaveAsOperation) save operation type, the document bases the default name on the value in the [`displayName`](/documentation/AppKit/NSDocument/displayName) property.

If there is a already another document or file in the same place and with the same name as would be returned by this method, [`NSDocument`](/documentation/AppKit/NSDocument) appends a number to the [`defaultDraftName()`](/documentation/AppKit/NSDocument/defaultDraftName()) string.

---

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)