I have implemented push notification generation using the following methods.
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
{
[[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]];
[[UIApplication sharedApplication] registerForRemoteNotifications];
}
else
{
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
(UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert)];
}
the device token generated correctly normally. But when switch off the Sounds and Badge App Icon and set the alert style as none, (Settings -> App Name -> Notifications) the device token not generating. This issue only occur in iOS 8 devices. In iOS 7 devices it correctly working. Could any one give solution for this.