Apple introduced new framework UserNotifications.framework for delivery and handling of local and remote notification. The UserNotifications framework supported iOS 10.0 + , tvOS 10.0 + , and watchOS 3.0+.
We are discussing only about the code for notification. Here the code for both iOS 10+ and also below of iOS version in Swift 3.0.
Step 1 : Import UserNotifications framework in your AppDelegate file for iOS 10.
Step 2 : Add UNUserNotificationCenterDelegate in AppDelegate.