Project: titanium
Issue TIMOB-17705: iOS8: Handle action types for Remote Notifications as well
Currently only actions on Local Notifications are handled. We, as Titanium Developers, can display Remote Notifications with Actions, but a click on one of the buttons is never received by the app. In TiApp.m the following is implemented for Local Notifications {code} - (void) application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forLocalNotification:(UILocalNotification *)notification completionHandler: {code} See: https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiApp.m#L441 A similar AppDelegate function has to be implemented to handle Actions on Remote Notifications {code} - application:handleActionWithIdentifier:forRemoteNotification:completionHandler: {code} See: https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UIApplicationDelegate_Protocol/#//apple_ref/occ/intfm/UIApplicationDelegate/application:handleActionWithIdentifier:forRemoteNotification:completionHandler: I reckon that the implementation can be similar to {code} - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {code} See: https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiApp.m#L825 With in addition a key in the event details which action was triggered.
Story points: 8