Background task when apns received
After reading APNS documentation, I have implemented apns into my app. Everything works fine, but I have a question. I don't know if it is possible, but I would like to do a task when my app is in background and I receive a apns notification. This is my dictionary inside the notification: aps = { alert = "message"; sound = "default"; }; If my app is in foreground, I execute this code: - (void)application:(UIApplication*)application didReceiveRemoteNotification:(NSDictionary*)userInfo { [HTTPConnection sendGetToUrl:[NSURL URLWithString:stringUrl]]; NSLog(@"Received notification: %@", userInfo);