# Einrichten von Badges für Unity

Da das Unity-Plugin den Header `PWNotificationExtensionManager` nicht enthält, müssen Sie einige zusätzliche Schritte durchführen, um Badges für Ihr Unity-Projekt zu implementieren.


<Aside type="note">
Informationen zur Implementierung von Badges für eine native iOS-App finden Sie in der Anleitung [Einrichten von Badges](/de/developer/pushwoosh-sdk/ios-sdk/setting-up-badges/).
</Aside>

### 1. Fügen Sie die Notification Service Extension hinzu (File -> New -> Target...)

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

### 2. Wählen Sie die „Notification Service Extension“

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

### 3. Fügen Sie Pushwoosh.xcframework wie folgt zum Ziel der NotificationService-Erweiterung hinzu:

1. Wählen Sie das Ziel der **NotificationService**-Erweiterung.
2. Gehen Sie zum Tab „**General**“.
3. Suchen Sie nach „**Framework and Libraries**“ und klicken Sie auf die Schaltfläche „**+**“.
4. Wählen Sie **Pushwoosh.xcframework** aus.



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

### 4. Aktualisieren Sie den Code der Notification Service Extension wie folgt:

```
#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. Fügen Sie die „App Groups Capability“ für jedes Ziel Ihrer Anwendung hinzu

<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 Capability"/>

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

### 6. Fügen Sie die App Groups ID zu Ihrer info.plist für jedes Ziel Ihrer Anwendung hinzu

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

## Teilen Sie uns Ihr Feedback mit

Ihr Feedback hilft uns, die Benutzererfahrung zu verbessern. Daher würden wir uns freuen, von Ihnen zu hören, falls Sie während des SDK-Integrationsprozesses auf Probleme stoßen. Sollten Sie Schwierigkeiten haben, zögern Sie bitte nicht, uns Ihre Gedanken [über dieses Formular](https://docs.google.com/forms/d/e/1FAIpQLSd\_0b8jwn-V\_JmoPLIxIFYbHACCQhrzidOZV3ELywoQPXRSxw/viewform) mitzuteilen.