diff options
author | Paul Beusterien <paulbeusterien@google.com> | 2017-12-08 10:12:15 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-08 10:12:15 -0800 |
commit | 49a7ed7fc9befb753a920ead5c31b80d3f7338c3 (patch) | |
tree | fe7653e7bdff6d39c09f63b291e610a3ce72b05f /Firebase/Messaging/FIRMessaging.m | |
parent | 3418244cd52ca4e4131ca106bf66cba754ec886c (diff) |
Fix FCM build warning introduced in Xcode 9 (#546)
Diffstat (limited to 'Firebase/Messaging/FIRMessaging.m')
-rw-r--r-- | Firebase/Messaging/FIRMessaging.m | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Firebase/Messaging/FIRMessaging.m b/Firebase/Messaging/FIRMessaging.m index 782b779..23feee9 100644 --- a/Firebase/Messaging/FIRMessaging.m +++ b/Firebase/Messaging/FIRMessaging.m @@ -384,7 +384,6 @@ 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:); @@ -403,7 +402,7 @@ NSString * const FIRMessagingRegistrationTokenRefreshedNotification = // Do nothing, as we don't support the app calling this block }]; - } else if ([appDelegate respondsToSelector:openURLWithOptionsSelector]) { + } else if (@available(iOS 9.0, *)) { [appDelegate application:application openURL:url options:@{}]; // Similarly, |application:openURL:sourceApplication:annotation:| will also always be called, due @@ -727,7 +726,7 @@ NSString * const FIRMessagingRegistrationTokenRefreshedNotification = - (void)receiver:(FIRMessagingReceiver *)receiver receivedRemoteMessage:(FIRMessagingRemoteMessage *)remoteMessage { - if ([self.delegate respondsToSelector:@selector(messaging:didReceiveMessage:)]) { + if (@available(iOS 10.0, *)) { [self.delegate messaging:self didReceiveMessage:remoteMessage]; } else if ([self.delegate respondsToSelector:@selector(applicationReceivedRemoteMessage:)]) { #pragma clang diagnostic push |