I would like to extend Sourav Gupta's answer a bit. Once you have done up to what Sourav explained, you have to implement the delegates for receiving push notification actions. The delegates are,
- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forLocalNotification:(UILocalNotification *)notification completionHandler:(void(^)())completionHandler {
// Handle actions of local notifications here. You can identify the action by using "identifier" and perform appropriate operations
if(completionHandler != nil) //Finally call completion handler if its not nil
completionHandler();
}
- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo completionHandler:(void(^)())completionHandler {
// Handle actions of remote notifications here. You can identify the action by using "identifier" and perform appropriate operations
if(completionHandler != nil) //Finally call completion handler if its not nil
completionHandler();
}
You can refer remote notification payload sample here iOS8 Push notification Payload