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

# batteryState

The battery state for the device.

```
var batteryState: UIDevice.BatteryState { get }
```

## Discussion

The value for [`batteryState`](/documentation/UIKit/UIDevice/batteryState-swift.property) is one of the constants in [`UIDevice.BatteryState`](/documentation/UIKit/UIDevice/BatteryState-swift.enum).

If battery monitoring is not enabled, the value of this property is [`UIDevice.BatteryState.unknown`](/documentation/UIKit/UIDevice/BatteryState-swift.enum/unknown).

---

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)