From f3eaa93123ffbf9902c5de381028d4de4e48ab1c Mon Sep 17 00:00:00 2001 From: Morgan Chen Date: Fri, 29 Jun 2018 11:38:14 -0700 Subject: Fix missing method in Messaging unswizzle --- Firebase/Messaging/FIRMessagingRemoteNotificationsProxy.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Firebase/Messaging/FIRMessagingRemoteNotificationsProxy.m b/Firebase/Messaging/FIRMessagingRemoteNotificationsProxy.m index e9d4791..c5ad337 100644 --- a/Firebase/Messaging/FIRMessagingRemoteNotificationsProxy.m +++ b/Firebase/Messaging/FIRMessagingRemoteNotificationsProxy.m @@ -211,7 +211,7 @@ static NSString *kReceiveDataMessageSelectorString = @"messaging:didReceiveMessa #pragma mark - UNNotificationCenter Swizzling -- (void)swizzleUserNotificationCenterDelegate:(id)delegate { +- (void)swizzleUserNotificationCenterDelegate:(id _Nonnull)delegate { if (self.currentUserNotificationCenterDelegate == delegate) { // Via pointer-check, compare if we have already swizzled this item. return; @@ -246,7 +246,7 @@ static NSString *kReceiveDataMessageSelectorString = @"messaging:didReceiveMessa } } -- (void)unswizzleUserNotificationCenterDelegate:(id)delegate { +- (void)unswizzleUserNotificationCenterDelegate:(id _Nonnull)delegate { if (self.currentUserNotificationCenterDelegate != delegate) { // We aren't swizzling this delegate, so don't do anything. return; @@ -256,6 +256,10 @@ static NSString *kReceiveDataMessageSelectorString = @"messaging:didReceiveMessa // Call unswizzle methods, even if the method was not implemented (it will fail gracefully). [self unswizzleSelector:willPresentNotificationSelector inClass:[self.currentUserNotificationCenterDelegate class]]; + SEL didReceiveNotificationResponseSelector = + NSSelectorFromString(kUserNotificationDidReceiveResponseSelectorString); + [self unswizzleSelector:didReceiveNotificationResponseSelector + inClass:[self.currentUserNotificationCenterDelegate class]]; self.currentUserNotificationCenterDelegate = nil; self.hasSwizzledUserNotificationDelegate = NO; } -- cgit v1.2.3