Presenting a local notification immediately

suggest change

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.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents