Instance Method







The app object that received the local notification.


A local notification that encapsulates details about the notification, potentially including custom data.


Local notifications are similar to remote notifications, but differ in that they are scheduled, displayed, and received entirely on the same device. An app can create and schedule a local notification, and the operating system then delivers it at the scheduled date and time. If the app is not active in the foreground when the notification fires, the system uses the information in the UILocalNotification object to determine whether it should display an alert, badge the app icon, or play a sound. If the app is running in the foreground, the system calls this method directly without alerting the user in any way.

You might implement this method in your delegate if you want to be notified that a local notification occurred. For example, a calendar app might use local notifications to alert the user to upcoming events.

If the user chooses to open the app when a local notification occurs, the launch options dictionary passed to the application:willFinishLaunchingWithOptions: and application:didFinishLaunchingWithOptions: methods contains the UIApplicationLaunchOptionsLocalNotificationKey key. This method is called at some point after your delegate’s application:didFinishLaunchingWithOptions: method.

See Also

Deprecated Symbols

- application:didRegisterUserNotificationSettings:

Called to tell the delegate the types of local and remote notifications that can be used to get the user’s attention.

- application:didReceiveRemoteNotification:

Called when your app has received a remote notification.

- application:handleActionWithIdentifier:forLocalNotification:completionHandler:

Called when your app has been activated because user selected a custom action from the alert panel of a local notification.

- application:handleActionWithIdentifier:forLocalNotification:withResponseInfo:completionHandler:


- application:handleActionWithIdentifier:forRemoteNotification:completionHandler:


- application:handleActionWithIdentifier:forRemoteNotification:withResponseInfo:completionHandler:


- application:handleOpenURL:

Asks the delegate to open a resource identified by URL.

- application:openURL:sourceApplication:annotation:

Asks the delegate to open a resource identified by a URL.