Configuration des badges pour Unity
Puisque le plugin Unity ne contient pas l’en-tête PWNotificationExtensionManager, vous devez effectuer plusieurs étapes supplémentaires pour implémenter les badges pour votre projet Unity.
1. Ajoutez une Notification Service Extension (File -> New -> Target…)
Anchor link to
2. Sélectionnez la « Notification Service Extension »
Anchor link to
3. Ajoutez Pushwoosh.xcframework à la cible de l’extension NotificationService comme suit :
Anchor link to- Choisissez la cible de l’extension NotificationService.
- Allez dans l’onglet « General ».
- Trouvez « Framework and Libraries » et appuyez sur le bouton « + ».
- Sélectionnez Pushwoosh.xcframework.

4. Mettez à jour le code de la Notification Service Extension comme suit :
Anchor link to#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. Ajoutez la « App Groups Capability » pour chaque cible de votre application
Anchor link to


6. Ajoutez l’ID des App Groups à votre fichier info.plist pour chaque cible de votre application
Anchor link to<key>PW_APP_GROUPS_NAME</key><string>group.com.example.demoapp_example</string>
Partagez vos commentaires avec nous
Anchor link toVos commentaires nous aident à créer une meilleure expérience, nous serions donc ravis de connaître votre avis si vous rencontrez des problèmes lors du processus d’intégration du SDK. Si vous rencontrez des difficultés, n’hésitez pas à nous faire part de vos réflexions via ce formulaire.