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

iOS: Local Notification Event not triggered when app is launched from the background

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Release 6.3.0, Release 7.1.1, Release 7.2.0
    • Fix Version/s: Release 7.3.1
    • Component/s: iOS
    • Environment:

      iPhone 8 Device + Simulator, Ti 6.3.0, 7.1.0, 7.2.0

      Description

      If a local notification is shown and the user taps the notification, the app opens, but the notification event is not triggered. It is triggered just fine if the app has already been opened but is not currently active in the foreground.

      Sample code - the alerts are never fired if tapping the notification is staring up the app:

      Ti.App.iOS.registerUserNotificationSettings({
      	types: [
      		Ti.App.iOS.USER_NOTIFICATION_TYPE_ALERT
      	]
      });
       
      Ti.App.iOS.addEventListener('notification', function(e) {
      	alert('notification');
      });
       
      Ti.App.iOS.addEventListener('localnotificationaction', function(e) {
      	alert('localnotificationaction');
      });
       
      Ti.App.addEventListener('pause',function()
      {
      	var timestamp = new Date(new Date().getTime() + 10000);
       
      	// The following code snippet schedules an alert to be sent within three seconds
      	var notification = Ti.App.iOS.scheduleLocalNotification({
      		category: "TEST",
      		alertAction: 'Read now',
      		alertBody: 'Custom message',
      		date: timestamp,
      		repeat: "daily",
      		//The following URL is passed to the application
      		userInfo: {
      			"task": "test"
      		}
      	});
      });
      

        Attachments

          Activity

            People

            • Assignee:
              hknoechel Hans Knöchel
              Reporter:
              mdelmarter Matthew Delmarter
              Reviewer:
              Vijay Singh
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-6480
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code