iOS UILocalNotification Responding to received local notification

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

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.



Got any iOS Question?