iOS Responding to received local notification


Example

IMPORTANT: This delegate method is only called in the foreground.

Swift

func application(application: UIApplication, didReceiveLocalNotification notification: UILocalNotification) {
    
}

Objective-C

- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
    
}

This method is generally overridden in the AppDelegate, which conforms to the UIApplicationDelegate protocol.