I\'m using UNUserNotificationCenter for ios 10. For testing, I\'m setting a local notification for 10 seconds from current time.
UNUserNotificationCenter
This is what I tried,>
Set NSDateComponents like:
NSDateComponents *components = [calendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay|NSCalendarUnitHour|NSCalendarUnitMinute|NSCalendarUnitSecond|NSCalendarUnitTimeZone fromDate:[[NSDate date] dateByAddingTimeInterval:10]];