@@ -384,6 +384,7 @@ - (void)handleIncomingLinkIfNeededFromMessage:(NSDictionary *)message {
384
384
id <UIApplicationDelegate> appDelegate = application.delegate ;
385
385
SEL continueUserActivitySelector =
386
386
@selector (application:continueUserActivity:restorationHandler: );
387
+ SEL openURLWithOptionsSelector = @selector (application:openURL:options: );
387
388
SEL openURLWithSourceApplicationSelector =
388
389
@selector (application:openURL:sourceApplication:annotation: );
389
390
SEL handleOpenURLSelector = @selector (application:handleOpenURL: );
@@ -402,7 +403,7 @@ - (void)handleIncomingLinkIfNeededFromMessage:(NSDictionary *)message {
402
403
// Do nothing, as we don't support the app calling this block
403
404
}];
404
405
405
- } else if (@ available (iOS 9.0 , *) ) {
406
+ } else if ([appDelegate respondsToSelector: openURLWithOptionsSelector] ) {
406
407
[appDelegate application: application openURL: url options: @{}];
407
408
408
409
// Similarly, |application:openURL:sourceApplication:annotation:| will also always be called, due
@@ -726,7 +727,7 @@ - (void)setAPNSToken:(NSData *)apnsToken error:(NSError *)error {
726
727
727
728
- (void )receiver : (FIRMessagingReceiver *)receiver
728
729
receivedRemoteMessage : (FIRMessagingRemoteMessage *)remoteMessage {
729
- if (@ available (iOS 10.0 , *) ) {
730
+ if ([ self .delegate respondsToSelector: @selector ( messaging:didReceiveMessage: )] ) {
730
731
[self .delegate messaging: self didReceiveMessage: remoteMessage];
731
732
} else if ([self .delegate respondsToSelector: @selector (applicationReceivedRemoteMessage: )]) {
732
733
#pragma clang diagnostic push
0 commit comments