In my app I need to set badge onto the app icon and set numbers for this badge. The problem is that I need to register user notification settings like this:
if ([[UIApplication sharedApplication] respondsToSelector:@selector(registerUserNotificationSettings:)])
{
[[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeBadge categories:nil]];
}
in order to make it work on iOS8. If I run this code then on start system presents an alert to the user which says something like:ApplicationName would like to send you notifications. Notifications may include bla la bla
. It's the standard one, I'm sure you've seen it many times. Just because I registered notification settings the system thinks my app is going to post some notifications. But it's not! I don't want to post notifications. All I wanna do is to set badge onto the icon and a number onto this badge. Is there any possibility to achieve this on iOS 8 without registering user notifications or registering but not showing that system alert? Any ideas, guys?