I already knew about this code which can be used before iOS 10:
func application(_ application: UIApplication, didReceive notification: UILocalNotification) {
}
However, it's depreciated so I just want to ask is there any method that is equivalent to the UserNotifications
framework or I just have to get by with this warning?
Note that I want the app to do something when app is in the background or is terminated.