My iPhone app's delegate has push notifications all set up:
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
for (id key in userInfo) {
NSLog(@"key: %@, value: %@", key, [userInfo objectForKey:key]);
}
}
Now, I launch it, then suspend by pressing the home button. I then send a notification to the device, and the notification is received. A dialog appears with two buttons - "Close", and "View". Now, when I click "View", the app gets resumed, and didReceiveRemoteNotification is sent to the delegate.
But if I click "Close", the app remains in the background. If I then manually launch the app, neither "didReceiveRemoteNotification", nor "didFinishLaunchingWithOptions" are sent. So - where is my payload? How do I get the payload in this case?