<!--
{
  "availability" : [
    "iOS: 2.0.0 - 13.0.0",
    "iPadOS: 2.0.0 - 13.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "tvOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIApplication/keyWindow",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIApplication(py)keyWindow"
  },
  "title" : "keyWindow"
}
-->

# keyWindow

The app’s key window.

```
var keyWindow: UIWindow? { get }
```

## Discussion

This property holds the [`UIWindow`](/documentation/UIKit/UIWindow) object in the [`windows`](/documentation/UIKit/UIApplication/windows) array that is most recently sent the [`makeKeyAndVisible()`](/documentation/UIKit/UIWindow/makeKeyAndVisible()) message.

---

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)