Skip to content

Commit

Permalink
Merge pull request #396 from Pushwoosh/bugfix/SDK-213-double-push-not…
Browse files Browse the repository at this point in the history
…ification

[bugfix][SDK-213] double push notification iOS
  • Loading branch information
akidisdev authored Jan 23, 2024
2 parents bb14312 + 5f5def0 commit 4873b3e
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/ios/PushNotification.m
Original file line number Diff line number Diff line change
Expand Up @@ -206,18 +206,6 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center
API_AVAILABLE(ios(10.0)) {

if ([self isRemoteNotification:notification] && [PWMessage isPushwooshMessage:notification.request.content.userInfo]) {
UNMutableNotificationContent *content = notification.request.content.mutableCopy;

NSMutableDictionary *userInfo = content.userInfo.mutableCopy;
userInfo[@"pw_push"] = @(YES);

content.userInfo = userInfo;

//newsstand push
if (![self isContentAvailablePush:userInfo]) {
[[Pushwoosh sharedInstance] handlePushReceived:[self pushPayloadFromContent:content]];
}

completionHandler(UNNotificationPresentationOptionNone);
} else if ([PushNotificationManager pushManager].showPushnotificationAlert || [notification.request.content.userInfo objectForKey:@"pw_push"] == nil) {
completionHandler(UNNotificationPresentationOptionBadge | UNNotificationPresentationOptionAlert | UNNotificationPresentationOptionSound);
Expand Down

0 comments on commit 4873b3e

Please sign in to comment.