In the application: didReceiveRemoteNotification: fetchCompletionHandler, user data is passed to didReceiveRemoteNotification, which is an NSDictionary. The details you want to receive are probably on the "aps" key of userInfo.
func application(application: UIApplication, didReceiveRemoteNotification userInfo: NSDictionary!) { var notificationDetails: NSDictionary = userInfo.objectForKey("aps") as NSDictionary }
When the application is not running, you will need to get it from the application: didFinishedLaunchWithOptions,
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool { if let launchOpts = launchOptions { var notificationDetails: NSDictionary = launchOpts.objectForKey(UIApplicationLaunchOptionsRemoteNotificationKey) as NSDictionary } return true }
EDIT: Remote Notification Syntax Syntax
source share