From a447eed5af9bf653cdd3326184edf2b3908d3f51 Mon Sep 17 00:00:00 2001 From: apouche Date: Mon, 15 Dec 2014 22:39:09 +0100 Subject: [PATCH 1/2] removed unused method --- ZeroPush-iOS/ZeroPush.h | 6 ------ ZeroPush-iOS/ZeroPush.m | 5 ----- 2 files changed, 11 deletions(-) diff --git a/ZeroPush-iOS/ZeroPush.h b/ZeroPush-iOS/ZeroPush.h index 6e7ba99..43bdb1e 100644 --- a/ZeroPush-iOS/ZeroPush.h +++ b/ZeroPush-iOS/ZeroPush.h @@ -46,12 +46,6 @@ */ + (NSString *)deviceTokenFromData:(NSData *)tokenData; -/** - * A convenience wrapper for [[UIApplication sharedApplication] registerForRemoteNotificationTypes:types]; - * deprecated in iOS7 - */ -- (void)registerForRemoteNotificationTypes:(UIRemoteNotificationType)types; - /** * Preferred method for registering for notifications. Backwards compatible with iOS7 */ diff --git a/ZeroPush-iOS/ZeroPush.m b/ZeroPush-iOS/ZeroPush.m index 63866a6..970cd13 100644 --- a/ZeroPush-iOS/ZeroPush.m +++ b/ZeroPush-iOS/ZeroPush.m @@ -69,11 +69,6 @@ -(id)init { return self; } -- (void)registerForRemoteNotificationTypes:(UIRemoteNotificationType)types; -{ - [[UIApplication sharedApplication] registerForRemoteNotificationTypes:types]; -} - - (void)registerForRemoteNotifications { #ifdef __IPHONE_8_0 From 3ef1e973e71718a39ec4165bc71104b40adb4b5a Mon Sep 17 00:00:00 2001 From: apouche Date: Mon, 15 Dec 2014 22:40:08 +0100 Subject: [PATCH 2/2] removed warning for ios 8 targets --- ZeroPush-iOS/ZeroPush.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ZeroPush-iOS/ZeroPush.m b/ZeroPush-iOS/ZeroPush.m index 970cd13..e4b8169 100644 --- a/ZeroPush-iOS/ZeroPush.m +++ b/ZeroPush-iOS/ZeroPush.m @@ -76,12 +76,12 @@ - (void)registerForRemoteNotifications UIUserNotificationSettings* notificationSettings = [UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound) categories:nil]; [[UIApplication sharedApplication] registerUserNotificationSettings:notificationSettings]; [[UIApplication sharedApplication] registerForRemoteNotifications]; - } else { - [[UIApplication sharedApplication] registerForRemoteNotificationTypes: (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)]; } -#else - [[UIApplication sharedApplication] registerForRemoteNotificationTypes: (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)]; + else #endif + { + [[UIApplication sharedApplication] registerForRemoteNotificationTypes: (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)]; + } } - (NSDictionary *)userInfoForData:(id)data andResponse:(NSHTTPURLResponse *)response