From 8ba408efb1929a55a1ccd435dfd66b25790595c5 Mon Sep 17 00:00:00 2001 From: Christopher Bowns Date: Wed, 24 Jun 2015 18:47:40 -0700 Subject: [PATCH] Flag off compiler warnings for deprecated calls to old remote notification calls. Fixes #1. --- ZeroPush-iOS/ZeroPush.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ZeroPush-iOS/ZeroPush.m b/ZeroPush-iOS/ZeroPush.m index 0d494fc..0d0c7f6 100644 --- a/ZeroPush-iOS/ZeroPush.m +++ b/ZeroPush-iOS/ZeroPush.m @@ -71,7 +71,10 @@ -(id)init { - (void)registerForRemoteNotificationTypes:(UIRemoteNotificationType)types; { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" [[UIApplication sharedApplication] registerForRemoteNotificationTypes:types]; +#pragma clang diagnostic pop } - (void)registerForRemoteNotifications @@ -82,7 +85,10 @@ - (void)registerForRemoteNotifications [[UIApplication sharedApplication] registerUserNotificationSettings:notificationSettings]; [[UIApplication sharedApplication] registerForRemoteNotifications]; } else { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" [[UIApplication sharedApplication] registerForRemoteNotificationTypes: (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)]; +#pragma clang diagnostic pop } #else [[UIApplication sharedApplication] registerForRemoteNotificationTypes: (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];