"RegisterForRemoteNotificationTypes: is not supported in iOS 8.0 and later" solution in iOS 8, ios8.0.2
Repeat the problem:
The notification registration method is changed in iOS 8. If the App needs to support both iOS 7 and 8, check selector first.
Solution: In Xcode 6
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions{ //-- Set Notification if ([application respondsToSelector:@selector(isRegisteredForRemoteNotifications)]) { // iOS 8 Notifications [application registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]]; [application registerForRemoteNotifications]; } else { // iOS < 8 Notifications [application registerForRemoteNotificationTypes: (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound)]; } //--- your custom code return YES;}
Refer:
Http://stackoverflow.com/questions/24454033/registerforremotenotificationtypes-is-not-supported-in-ios-8-0-and-later
The code is reproduced from:
Http://stackoverflow.com/a/24773465/3458781