<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DockKit",
  "identifier" : "/documentation/DockKit/DockAccessory/BatteryState",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "DockKit"
    ],
    "preciseIdentifier" : "s:7DockKit0A9AccessoryC12BatteryStateV"
  },
  "title" : "DockAccessory.BatteryState"
}
-->

# DockAccessory.BatteryState

A struct that represents an accessory battery state.

```
struct BatteryState
```

## Overview

This state is emitted when the battery level changes on accessory.

## Topics

### Instance Properties

[`let batteryLevel: Double`](/documentation/DockKit/DockAccessory/BatteryState/batteryLevel)

Current charge percentage (0..1) of the battery

[`let chargeState: DockAccessory.BatteryChargeState`](/documentation/DockKit/DockAccessory/BatteryState/chargeState)

An enumeration representing the charge state of the battery

[`let lowBattery: Bool`](/documentation/DockKit/DockAccessory/BatteryState/lowBattery)

True when accessory deems its charge to be too low to function properly

[`let name: String`](/documentation/DockKit/DockAccessory/BatteryState/name)

The name of the battery that is sending this state from accessory

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

[`Hashable`](/documentation/Swift/Hashable)

---

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)