Well, the only function that receives the PN that I know of is "didReceiveRemoteNotification", and that only happens when the app is running in either the foreground or background.
So sure, I've implemented the "applicationDidBecomeActive"-method and are able to react to a PN in both these states.
But what I really wanted was to be able to react to a PN when the app is entirely closed (not running in the background) and the user opens the app by clicking the PN (not the app-icon). Is this not possible?
This is done by OS..
And you don't need the applicationDidBecomeActive method.
In your receiveNotification method, you can refer to your own method, which implements code to check wether you are in the app foreground or not.
By checking the [[UIApplication sharedApplication] state]; I think.
Then, next to your last queston again.
When your app is closed, and you send a PN, (which you know, can have a dictionary of some bytes sended with it). and you click VIEW (you can even send a soundname with it, if it's within your apps bundle, it will play, this is all in the documentation).
So, if you click VIEW, the app will open itself, containing a dictionary in the didReceiveNotification stuff. And you can do stuff based upon that dictionary.
Hope that was of any help.