aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Morgan Chen <morganchen12@gmail.com>2018-06-29 14:26:28 -0700
committerGravatar GitHub <noreply@github.com>2018-06-29 14:26:28 -0700
commitced3f445baf8cb4814186833d0054f0933314f93 (patch)
tree6e4ff46aaf117b7ab102a13e71bb3a03fda462ab
parent382dd0c8d9e48379c57429a06f4df1605d441d37 (diff)
parentf3eaa93123ffbf9902c5de381028d4de4e48ab1c (diff)
Merge pull request #1483 from morganchen12/messaging-unswizzle
Fix missing method in Messaging unswizzle
-rw-r--r--Firebase/Messaging/FIRMessagingRemoteNotificationsProxy.m8
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;
}