Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-17705

iOS8: Handle action types for Remote Notifications as well

    Details

    • Type: Improvement
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 3.4.0, Release 3.5.0
    • Component/s: iOS
    • Labels:
      None
    • Story Points:
      8
    • Sprint:
      2014 Sprint 19 SDK

      Description

      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

      - (void) application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forLocalNotification:(UILocalNotification *)notification completionHandler:
      

      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

      - application:handleActionWithIdentifier:forRemoteNotification:completionHandler:
      

      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

      - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
      

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jalter Jon Alter
                Reporter:
                timanrebel Timan Rebel
                Reviewer:
                Vishal Duggal (Inactive)
                Tester:
                Wilson Luu (Inactive)
              • Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Source Code