I want to save a push notification that arrives when the application is in background state. I know about
-(void) application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
This delegate method is called when the app is in foreground or background (if the user just clicks on the received notification).
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
This method is called only once when the app starts.
What if the user doesn't click on the notification? How can I save the data of that notification in the database of my app in that case?