diff options
author | Chen Liang <chliang@google.com> | 2018-05-22 10:51:08 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-22 10:51:08 -0700 |
commit | c6d5b68b086b595f91e8a586e98b8a70b2b118aa (patch) | |
tree | 35d86ac63f169b1c70f4469a68c9abe0d39a0bfc | |
parent | 3bba0ba042832273e623cb78b988060d976743f4 (diff) |
add macro to remove deprecated warning (#1295)
-rw-r--r-- | Firebase/Messaging/FIRMessaging.m | 7 | ||||
-rw-r--r-- | Firebase/Messaging/FIRMessagingContextManagerService.m | 3 | ||||
-rw-r--r-- | Firebase/Messaging/FIRMessagingReceiver.m | 4 |
3 files changed, 12 insertions, 2 deletions
diff --git a/Firebase/Messaging/FIRMessaging.m b/Firebase/Messaging/FIRMessaging.m index ec077c3..d5e0a01 100644 --- a/Firebase/Messaging/FIRMessaging.m +++ b/Firebase/Messaging/FIRMessaging.m @@ -411,13 +411,18 @@ NSString *const kFIRMessagingPlistAutoInitEnabled = // Similarly, |application:openURL:sourceApplication:annotation:| will also always be called, due // to the default swizzling done by FIRAAppDelegateProxy in Firebase Analytics } else if ([appDelegate respondsToSelector:openURLWithSourceApplicationSelector]) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" [appDelegate application:application openURL:url sourceApplication:FIRMessagingAppIdentifier() annotation:@{}]; - +#pragma clang diagnostic pop } else if ([appDelegate respondsToSelector:handleOpenURLSelector]) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" [appDelegate application:application handleOpenURL:url]; +#pragma clang diagnostic pop } } diff --git a/Firebase/Messaging/FIRMessagingContextManagerService.m b/Firebase/Messaging/FIRMessagingContextManagerService.m index 65f64ad..c7be606 100644 --- a/Firebase/Messaging/FIRMessagingContextManagerService.m +++ b/Firebase/Messaging/FIRMessagingContextManagerService.m @@ -129,7 +129,10 @@ typedef NS_ENUM(NSUInteger, FIRMessagingContextManagerMessageType) { + (void)scheduleLocalNotificationForMessage:(NSDictionary *)message atDate:(NSDate *)date { NSDictionary *apsDictionary = message; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" UILocalNotification *notification = [[UILocalNotification alloc] init]; +#pragma clang diagnostic pop // A great way to understand timezones and UILocalNotifications // http://stackoverflow.com/questions/18424569/understanding-uilocalnotification-timezone diff --git a/Firebase/Messaging/FIRMessagingReceiver.m b/Firebase/Messaging/FIRMessagingReceiver.m index 7a99c92..981dfb1 100644 --- a/Firebase/Messaging/FIRMessagingReceiver.m +++ b/Firebase/Messaging/FIRMessagingReceiver.m @@ -120,9 +120,11 @@ static int downstreamMessageID = 0; } else if ([appDelegate respondsToSelector:oldNotificationSelector]) { // Try the old remote notification callback +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" [appDelegate application: [UIApplication sharedApplication] didReceiveRemoteNotification:message]; - +#pragma clang diagnostic pop } else { FIRMessagingLoggerError(kFIRMessagingMessageCodeReceiver005, @"None of the remote notification callbacks implemented by " |