Skip to content

Commit 280334d

Browse files
authored
Fix cancel local notification (#424)
1 parent dfc5c08 commit 280334d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Leanplum-SDK/Classes/Notifications/Local/LPLocalNotificationsManager.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ - (void)listenForLocalNotifications
188188
for (UNNotificationRequest *request in requests) {
189189
NSString *messageId = [[LPNotificationsManager shared] messageIdFromUserInfo:[request.content userInfo]];
190190
if ([messageId isEqualToString:context.messageId]) {
191-
[UNUserNotificationCenter.currentNotificationCenter removeDeliveredNotificationsWithIdentifiers:@[request.identifier]];
191+
[UNUserNotificationCenter.currentNotificationCenter removePendingNotificationRequestsWithIdentifiers:@[request.identifier]];
192192
if ([LPConstantsState sharedState].isDevelopmentModeEnabled) {
193193
LPLog(LPInfo, @"Cancelled notification");
194194
}

0 commit comments

Comments
 (0)