UIUserNotificationType was deprecated in iOS10 Swift 3.0
问题 I am getting this warning in iOS 10 which previously is working fine on iOS 9 :- Is there another function to fix this warning in iOS 10, appreciated if anyone would have idea for this issue. 回答1: in iOS10 UIUserNotificationType has deprecated , use UNUserNotificationCenter dont forget to enable this for Swift3 for sample see this import the UserNotifications framework and add the UNUserNotificationCenterDelegate in Appdelegate import UserNotifications @UIApplicationMain class AppDelegate: