title: UNUserNotificationCenter did receive response with completion handler is never called iOS10, swift 2.3
body: <p>I am scheduling new notifications in iOS10, like this:</p>
  
  <pre><code>func scheduleNotification (event : Meeting, todaysBadgeCounter: Int) {
  
      if #available(iOS 10.0, *) {
  
          let minutesBefore = 10
          //interval in seconds from current point in time to notification
          let interval : NSTimeInterval = NSTimeInterval(secondsFromNowTo(event.startTime.dateByAddingTimeInterval(-minutesBefore * 60)))
  
          //only schedule in the future
          if(interval &gt; 0){
  
  
              let category = NotificationsController.notificationCategory
  
              let center = NotificationsController.notificationCenter
              center.setNotificationCategories([category])
              let content = UNMutableNotificationContent()
  
              content.title = NSString.localizedUserNotificationStringForKey(event.title, arguments: nil)
              if(minutesBefore &lt;= 1){
                  content.body = NSString.localizedUserNotificationStringForKey("IOS10: Your \(event.title) is about to start", arguments: nil)
              }else{
                  content.body = NSString.localizedUserNotificationStringForKey("IOS10: You have \(event.title) in \(Int(minutesBefore)) minutes", arguments: nil)
  
              }
              content.sound = UNNotificationSound.defaultSound()
  
              let trigger = UNTimeIntervalNotificationTrigger.init(timeInterval: interval, repeats: false)
              let identifier = NSString.localizedUserNotificationStringForKey("sampleRequest\(event.UUID)", arguments: nil)
              let request = UNNotificationRequest.init(identifier: identifier, content: content, trigger: trigger)
  
              //setting the delegate
              center.delegate = self
  
              center.addNotificationRequest(request, withCompletionHandler: { (error) in
                  // handle the error if needed
                  log.error(error?.localizedDescription)
                  print("SCHEDULING &gt;=iOS10:", event.title, ", interval:", interval)
              })
          }
  
  
  //return category
  @available(iOS 10.0, *)
  class var notificationCategory : UNNotificationCategory {
      struct Static {
          static let callNow = UNNotificationAction(identifier: NotificationActions.callNow.rawValue, title: "Call now", options: [])
          static let clear = UNNotificationAction(identifier: NotificationActions.clear.rawValue, title: "Clear", options: [])
          static let category : UNNotificationCategory = UNNotificationCategory.init(identifier: "CALLINNOTIFICATION", actions: [callNow, clear], intentIdentifiers: [], options: [])
  
      }
      return Static.category
  }
  </code></pre>
  
  <p>I am able to schedule notifications, and receive local notifications at the right time. <strong>BUT:</strong> my delegate methods that I used according to the tutorial are never executed, however the didReceiveLocalNotification is executed each time I tap on the notification:</p>
  
  <pre><code>extension NotificationsController: UNUserNotificationCenterDelegate {
  
  @available(iOS 10.0, *)
  func userNotificationCenter(center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: () -&gt; Void) {
  
      print("IOS10 delivered")
  
      // Response has actionIdentifier, userText, Notification (which has Request, which has Trigger and Content)
      switch response.actionIdentifier {
      case NotificationActions.NotifyBefore.rawValue:
          print("notify")
          break
  
      case NotificationActions.callNow.rawValue:
          print("callNow")
          break
      case NotificationActions.clear.rawValue:
          print("clear")
      default: break
      }
  }
  
  @available(iOS 10.0, *)
  func userNotificationCenter(center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: (UNNotificationPresentationOptions) -&gt; Void) {
  
          // Delivers a notification to an app running in the foreground.
          print("IOS10 delivered 2222")
  
      }
  }
  </code></pre>
  
  <p>Wasn't didReceiveLocalNotification deprecated? How to make these methods to be called? </p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I updated my code with some suggestions from here, namely: </p>
  
  <ol>
  <li>I added assigning of the UNUserNotificationCenter.delegate to the applicationDidFinishLaunchingWithOptions.</li>
  <li>I also tried moving these methods (delegate methods) out of the extension to the NotificationsController.swift class, and setting this class as UNUserNotificationCenterDelegate. Did not work for me either.</li>
  </ol>