<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIDocument/localizedName",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIDocument(py)localizedName"
  },
  "title" : "localizedName"
}
-->

# localizedName

The localized name of the document.

```
var localizedName: String { get }
```

## Discussion

By default, UIKit obtains the value from the filename component of [`fileURL`](/documentation/UIKit/UIDocument/fileURL). You can override the getter accessor method of this property to provide a custom name for presentation to the user, such as in error strings. See [`UIDocument`](/documentation/UIKit/UIDocument) for overriding advice.

UIKit sets this property before it calls the completion handlers of the [`open(completionHandler:)`](/documentation/UIKit/UIDocument/open(completionHandler:)), [`save(to:for:completionHandler:)`](/documentation/UIKit/UIDocument/save(to:for:completionHandler:)), and [`revert(toContentsOf:completionHandler:)`](/documentation/UIKit/UIDocument/revert(toContentsOf:completionHandler:)). If, outside of these methods or their completion handlers, you want to wait for any pending file operations to complete before you access this property, you can call [`performAsynchronousFileAccess(_:)`](/documentation/UIKit/UIDocument/performAsynchronousFileAccess(_:)) and access the property value in the block parameter.

---

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)