# Badge Management

Manage the badge number that appears on your app icon, including manual control and automatic incrementing.

The badge appears as a number on your app icon. You can set, reset, or enable auto-badge functionality.

## Get Badge Value

The `badgeNumber` property returns the current badge number used by both the device and the Airship server. This property must be accessed on the main thread.


#### Swift


```swift
let currentBadge = await Airship.push.badgeNumber
```



#### Objective-C


> **Note:** This async property is not available in Objective-C. Use `UIApplication.shared.applicationIconBadgeNumber` to read the current badge value.




## Set Badge Value

Set the badge number to a specific value. This updates both the device badge and the value stored on Airship servers.


#### Swift


```swift
try await Airship.push.setBadgeNumber(20)
```



#### Objective-C


> **Note:** This async method is not available in Objective-C. Use `UIApplication.shared.applicationIconBadgeNumber` to set the badge value directly.




## Reset Badge

Reset the badge to zero on both the device and Airship servers.


#### Swift


```swift
try await Airship.push.resetBadge()
```



#### Objective-C


> **Note:** This async method is not available in Objective-C. Set `UIApplication.shared.applicationIconBadgeNumber = 0` to reset the badge directly.




## Auto-Badge

Auto-badge automatically updates the badge number stored by Airship every time the app is started or foregrounded, instead of setting an exact value.


#### Swift


```swift
Airship.push.autobadgeEnabled = true
```



#### Objective-C


```objc
UAirship.push.autobadgeEnabled = YES;
```




> **Important:** When using auto-badge, only modify the badge value through Airship methods to ensure the value stays in sync.


