I am implementing a alarm where i am getting pushNotification from server, i am receiving perfect push notification and it is working fine in foreground mode but when applicatio
If you app is suspended check the UIApplicationLaunchOptionsRemoteNotificationKey
in the dictionary from application:didFinishLaunchingWithOptions
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
...
// Check if launched from notification
if let userInfo = launchOptions?[UIApplicationLaunchOptionsRemoteNotificationKey] as? [String: AnyObject] {
// handle your notification like in application:didReceiveRemoteNotificatioUserInfo:
}
...
}