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..e4b8169 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 @@ -81,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