title: How to turn off specific notification types on iOS
body: <p>In the first version of my app, I registered it with:</p>
  
  <pre><code>(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound|UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge).
  </code></pre>
  
  <p>This is how I did it:</p>
  
  <pre><code>UIUserNotificationType userNotificationTypes = (UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeBadge);
  UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:userNotificationTypes
                                                                                   categories:nil];
  [[UIApplication sharedApplication] registerUserNotificationSettings:settings];
  [[UIApplication sharedApplication] registerForRemoteNotifications];
  </code></pre>
  
  <p>Now in the second version of my app, I decided to abandon the badge notification by registering notifications again with this:</p>
  
  <pre><code>UIUserNotificationType userNotificationTypes = (UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound);
  UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:userNotificationTypes
                                                                                   categories:nil];
  [[UIApplication sharedApplication] registerUserNotificationSettings:settings];
  [[UIApplication sharedApplication] registerForRemoteNotifications];
  </code></pre>
  
  <p>I was expecting the badge notifications would be turned off from now on.  When I went into the settings menu and checked the notification settings for my app. The toggle switch for badge was gone, but the badge number was still getting updated.</p>
  
  <p>I suspect that my approach only unregistered UIRemoteNotificationTypeBadge, but not turning it off. Is there a way to achieve this? Thanks!</p>