I have done as per the book, I have made NotificationDelegate and extracted out the functionality out of AppDelegate.
the line where it assigning:
center.delegate = self?.notificationDelegate
problem is this when I have above delegate method
func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void)
func userNotificationCenter(_ center: UNUserNotificationCenter,
didReceive response: UNNotificationResponse,
withCompletionHandler completionHandler: @escaping () -> Void)
Are not being called.
but if I move those methods to AppDelegate and change assignment like.
center.delegate = self
I am not sure what is happening. I already check self?.notioficationDelegate have value.
Is there any other way I can troubleshoot it. I believe I am not missing anything. Am I?