Contents

launchUserNotificationUserInfoKey

A key that indicates your app was launched because a user activated a notification in the Notification Center.

Declaration

class let launchUserNotificationUserInfoKey: String

Discussion

The launchUserNotificationUserInfoKey key is an NSUserNotification object that is present in the userInfo dictionary of the didFinishLaunchingNotification notification if your app was launched because a user activated a notification in the Notification Center. To access the notification payload in the userInfo dictionary, you can use code like this:

NSUserNotification *userNotification = [[myNotification userInfo]
    objectForKey:NSApplicationLaunchUserNotificationKey];
    if (userNotification) {
        // The app was launched by a user selection from Notification Center.
    }

See Also

Keys