title: iOS- How to integrate push notification in iOS 10?
body: <p>I have used following code for iOS 8,9 as:</p>
  
  <pre><code> UIMutableUserNotificationAction *action1;
      action1 = [[UIMutableUserNotificationAction alloc] init];
      [action1 setActivationMode:UIUserNotificationActivationModeBackground];
      [action1 setTitle:@"REJECT"];
      [action1 setIdentifier:NotificationActionOneIdent];
      [action1 setDestructive:NO];
      [action1 setAuthenticationRequired:NO];
  
      UIMutableUserNotificationAction *action2;
      action2 = [[UIMutableUserNotificationAction alloc] init];
      [action2 setActivationMode:UIUserNotificationActivationModeBackground];////UIUserNotificationActivationModeBackground
      [action2 setTitle:@"ACCEPT"];
      [action2 setIdentifier:NotificationActionTwoIdent];
      [action2 setDestructive:NO];
      [action2 setAuthenticationRequired:NO];
  
      UIMutableUserNotificationCategory *actionCategory;
      actionCategory = [[UIMutableUserNotificationCategory alloc] init];
      [actionCategory setIdentifier:NotificationCategoryIdent];
      [actionCategory setActions:@[action1, action2]
                      forContext:UIUserNotificationActionContextDefault];
  
      NSSet *categories = [NSSet setWithObject:actionCategory];
  
      UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:
                                          UIUserNotificationTypeSound | UIUserNotificationTypeAlert categories:categories];
      [[UIApplication sharedApplication] registerUserNotificationSettings:settings];
  </code></pre>
  
  <p>Handle by delegate methods:</p>
  
  <pre><code>- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
  {
  //Handle according to app state
  }
  </code></pre>
  
  <p>And
  //Handle actions </p>
  
  <pre><code>- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo completionHandler:(void (^)())completionHandler {
  //Handle action as well
  }
  </code></pre>
  
  <p>How to do same in iOS 10 using UserNotifications and UserNotificationsUI framework? also i need to support for iOS 8 and iOS 9?</p>