presentLocalNotificationNow(_:)
Presents a local notification immediately.
Declaration
func presentLocalNotificationNow(_ notification: UILocalNotification)Parameters
- notification:
A local notification that the operating system presents for the app immediately, regardless of the value of the notification’s Firedate property. Apps running in the background state can immediately present local notifications when there are incoming chats, messages, or updates. Because the operating system copies
notification, you may release it once you have scheduled it.
Discussion
Prior to scheduling any local notifications, you must call the registerUserNotificationSettings(_:) method to let the system know what types of alerts, if any, you plan to display to the user.
See Also
Deprecated methods
requestSceneSessionActivation(_:userActivity:options:errorHandler:)beginIgnoringInteractionEvents()endIgnoringInteractionEvents()setMinimumBackgroundFetchInterval(_:)scheduleLocalNotification(_:)cancelLocalNotification(_:)cancelAllLocalNotifications()setKeepAliveTimeout(_:handler:)UIMinimumKeepAliveTimeoutclearKeepAliveTimeout()setStatusBarHidden(_:with:)setStatusBarStyle(_:animated:)setStatusBarOrientation(_:animated:)registerUserNotificationSettings(_:)registerForRemoteNotifications(matching:)