# Unity용 배지 설정하기

Unity 플러그인에는 `PWNotificationExtensionManager` 헤더가 포함되어 있지 않으므로, Unity 프로젝트에 배지를 구현하려면 몇 가지 추가 단계를 수행해야 합니다.


<Aside type="note">
iOS 네이티브 앱에 배지를 구현하려면 [배지 설정하기](/ko/developer/pushwoosh-sdk/ios-sdk/setting-up-badges/) 가이드를 참조하세요.
</Aside>

### 1. Notification Service Extension 추가하기 (File -> New -> Target...)

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

### 2. "Notification Service Extension" 선택하기

<img src="/cross-platform-frameworks-setting-up-badges-for-unity-1.webp" alt=""/>

### 3. 다음과 같이 NotificationService 확장 타겟에 Pushwoosh.xcframework를 추가합니다:

1. **NotificationService** 확장 타겟을 선택합니다.
2. "**General**" 탭으로 이동합니다.
3. '**Framework and Libraries**'를 찾아 '**+**' 버튼을 누릅니다.
4. **Pushwoosh.xcframework**를 선택합니다.



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

### 4. 다음과 같이 Notification Service Extension 코드를 업데이트합니다:

```
#import "NotificationService.h"
#import "PWNotificationExtensionManager.h"

@interface NotificationService ()

@property (nonatomic, strong) void (^contentHandler)(UNNotificationContent *contentToDeliver);
@property (nonatomic, strong) UNMutableNotificationContent *bestAttemptContent;

@end

@implementation NotificationService

- (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler {
    self.contentHandler = contentHandler;
    self.bestAttemptContent = [request.content mutableCopy];

    [[PWNotificationExtensionManager sharedManager] handleNotificationRequest:request contentHandler:contentHandler];
}

- (void)serviceExtensionTimeWillExpire {
    // Called just before the extension will be terminated by the system.
    // Use this as an opportunity to deliver your "best attempt" at modified content, otherwise the original push payload will be used.
    self.contentHandler(self.bestAttemptContent);
}

@end
```

### 5. 애플리케이션의 각 타겟에 "App Groups Capability"를 추가합니다

<img src="/cross-platform-frameworks-setting-up-badges-for-unity-2.webp" alt=""/>

<img src="/cross-platform-frameworks-setting-up-badges-for-unity-3.webp" alt="App Groups 기능"/>

<img src="/cross-platform-frameworks-setting-up-badges-for-unity-4.webp" alt="Info.plist"/>

### 6. 애플리케이션의 각 타겟에 대한 info.plist에 App Groups ID를 추가합니다

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

## 피드백을 공유해주세요

여러분의 피드백은 더 나은 경험을 만드는 데 도움이 됩니다. SDK 통합 과정에서 문제가 발생하면 저희에게 알려주세요. 어려움을 겪으신다면 주저하지 마시고 [이 양식을 통해](https://docs.google.com/forms/d/e/1FAIpQLSd\_0b8jwn-V\_JmoPLIxIFYbHACCQhrzidOZV3ELywoQPXRSxw/viewform) 의견을 공유해주세요.