aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firebase/Messaging/FIRMessaging.m
diff options
context:
space:
mode:
authorGravatar Kyle Ju <kyleju@live.com>2017-12-19 11:08:58 -0500
committerGravatar GitHub <noreply@github.com>2017-12-19 11:08:58 -0500
commitc7f8d7f8da619d6f2d7427bdca8a59b89a8a188a (patch)
treec0598a7593786a9075583e43a7cc246b1dfcca68 /Firebase/Messaging/FIRMessaging.m
parentea3369c192c998d947a2fb6caed7df336f028d98 (diff)
parent163eeeecb75f24f155becaa76a95574c266d8a4f (diff)
Merge pull request #576 from firebase/release-4.8.0
Release 4.8.0
Diffstat (limited to 'Firebase/Messaging/FIRMessaging.m')
-rw-r--r--Firebase/Messaging/FIRMessaging.m5
1 files changed, 3 insertions, 2 deletions
diff --git a/Firebase/Messaging/FIRMessaging.m b/Firebase/Messaging/FIRMessaging.m
index 23feee9..782b779 100644
--- a/Firebase/Messaging/FIRMessaging.m
+++ b/Firebase/Messaging/FIRMessaging.m
@@ -384,6 +384,7 @@ NSString * const FIRMessagingRegistrationTokenRefreshedNotification =
id<UIApplicationDelegate> appDelegate = application.delegate;
SEL continueUserActivitySelector =
@selector(application:continueUserActivity:restorationHandler:);
+ SEL openURLWithOptionsSelector = @selector(application:openURL:options:);
SEL openURLWithSourceApplicationSelector =
@selector(application:openURL:sourceApplication:annotation:);
SEL handleOpenURLSelector = @selector(application:handleOpenURL:);
@@ -402,7 +403,7 @@ NSString * const FIRMessagingRegistrationTokenRefreshedNotification =
// Do nothing, as we don't support the app calling this block
}];
- } else if (@available(iOS 9.0, *)) {
+ } else if ([appDelegate respondsToSelector:openURLWithOptionsSelector]) {
[appDelegate application:application openURL:url options:@{}];
// Similarly, |application:openURL:sourceApplication:annotation:| will also always be called, due
@@ -726,7 +727,7 @@ NSString * const FIRMessagingRegistrationTokenRefreshedNotification =
- (void)receiver:(FIRMessagingReceiver *)receiver
receivedRemoteMessage:(FIRMessagingRemoteMessage *)remoteMessage {
- if (@available(iOS 10.0, *)) {
+ if ([self.delegate respondsToSelector:@selector(messaging:didReceiveMessage:)]) {
[self.delegate messaging:self didReceiveMessage:remoteMessage];
} else if ([self.delegate respondsToSelector:@selector(applicationReceivedRemoteMessage:)]) {
#pragma clang diagnostic push