# Setting up badges

<Aside type="note">
To set badges for Cordova or React Native plugins, please refer to the corresponding guides:

* [Badges for Cordova](/developer/pushwoosh-sdk/cross-platform-frameworks/cordova/setting-up-badges-for-cordova)
* [Badges for React Native](/developer/pushwoosh-sdk/cross-platform-frameworks/react-native/setting-up-badges-for-react-native)
</Aside>

Starting with version 6.4.0 of Pushwoosh iOS SDK, the process of managing and setting badges through push notifications has changed.

If you were previously using the badges number to indicate the number of received push notifications in your application, you have to migrate to newer version of iOS SDK (6.4.0 or later). The older versions will be supported until the end of the second quarter of 2022.

## How to set up badges

To set up badges, follow the steps below:

1. Add Notification Service Extension  (File -> New -> Target...) 

<img src="/shared-7.webp" alt=""/>

2. Select the "Notification Service Extension"

<img src="/ios-push-notifications-setting-up-badges-1.webp" alt="Adding Notification Service Extension"/>

3. Replace the generated `NotificationService` class with a subclass of `PushwooshNotificationServiceExtension`. Pushwoosh handles the badge counting, delivery event, attachment download, and the timeout fallback for you:

<Tabs>
<TabItem label="Swift">
```swift
import PushwooshFramework

class NotificationService: PushwooshNotificationServiceExtension {}
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
#import <PushwooshFramework/PushwooshFramework.h>

@interface NotificationService : PushwooshNotificationServiceExtension
@end

@implementation NotificationService
@end
```
</TabItem>
</Tabs>

4. Add the App Groups capability to **both** targets — the main app and the Notification Service Extension — and use the same App Group for each.

5. Add the App Group ID to the **main app's** `info.plist`:

```
<key>PW_APP_GROUPS_NAME</key>
<string>group.com.example.demoapp_example</string>
```

<img src="/shared-12.webp" alt="Info.plist"/>

The extension inherits this value from the host app, so you don't need to repeat it in the extension's `info.plist` — add it there only to override the host value.

If you prefer not to use the **info.plist** file, provide the App Group in code by overriding `pushwooshAppGroupsName` in your NotificationServiceExtension class:

<Tabs>
<TabItem label="Swift">
```swift
override func pushwooshAppGroupsName() -> String? {
    "group.com.example.demoapp_example"
}
```
</TabItem>

<TabItem label="Objective-C">
```objective-c
- (NSString *)pushwooshAppGroupsName {
    return @"group.com.example.demoapp_example";
}
```
</TabItem>
</Tabs>

<LinkCard title="Example" href="https://github.com/Pushwoosh/pushwoosh-quickstart-ios/tree/main/badges/badges" />


## Send a push notification with badges

If you want to send push notification with badges from Pushwoosh Control Panel, just add a desired badge value to the **badges** text field as shown in the picture below:

<img src="/ios-push-notifications-setting-up-badges-5.webp" alt="Badges value"/>

<Aside type="note">
You can use the following value formats to send badges correctly: **+1, -1 or 5.** If you want to increment badge value, use **"+"** sign**,** if you want to decrement badges, use **"-"** sign**.**  You can also set the exact number by using e.g. **5** with no sign.
</Aside>

## Share your feedback with us

Your feedback helps us create a better experience, so we would love to hear from you if you have any issues during the SDK integration process. If you face any difficulties, please do not hesitate to share your thoughts with us [via this form](https://docs.google.com/forms/d/e/1FAIpQLSd\_0b8jwn-V\_JmoPLIxIFYbHACCQhrzidOZV3ELywoQPXRSxw/viewform).