iOS Presenting a local notification immediately


Example

If you want to show local notification immediately, you should call:

Swift 3

UIApplication.shared.presentLocalNotificationNow(notification)

Swift 2

UIApplication.sharedApplication().presentLocalNotificationNow(notification)

Objective-C

[[UIApplication sharedApplication] presentLocalNotificationNow:notification];

An advantage of using this is so you won't have to set the fireDate and timeZone properties of your UILocalNotification object.