diff options
author | Morgan Chen <morganchen12@gmail.com> | 2018-06-29 11:38:14 -0700 |
---|---|---|
committer | Morgan Chen <morganchen12@gmail.com> | 2018-06-29 11:38:14 -0700 |
commit | f3eaa93123ffbf9902c5de381028d4de4e48ab1c (patch) | |
tree | 3fd1722428b12ddd58e9326433aea106d7e77b4a /Firebase | |
parent | 7c34f464d8b1d530bba08a3adc5191112adb4ff1 (diff) |
Fix missing method in Messaging unswizzle
Diffstat (limited to 'Firebase')
-rw-r--r-- | Firebase/Messaging/FIRMessagingRemoteNotificationsProxy.m | 8 |
1 files 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; } |