Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5008] iOS: Ti.App.iOS.scheduleLocalNotification crashes without userInfo

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2011-11-05T15:40:41.000+0000
Affected Version/sRelease 1.7.2
Fix Version/sSprint 2011-35, Release 1.8.0
ComponentsiOS
Labelsn/a
ReporterMatthew Congrove
AssigneeReggie Seagraves
Created2011-08-15T10:37:54.000+0000
Updated2014-06-19T12:46:29.000+0000

Description

Creating a LocalNotification without the userInfo property causes the application to crash. This breaks:
Ti.App.iOS.scheduleLocalNotification({
    date: new Date(new Date().getTime() + 3000),
    alertBody: "Let's crash!"
});

Ti.App.iOS.addEventListener('notification', function(e) {});
Adding dummy data will work (and is an acceptable work-around for the time being):
Ti.App.iOS.scheduleLocalNotification({
    date: new Date(new Date().getTime() + 3000),
    userInfo: {why: 'me'},
    alertBody: "I'm fine"
});

Ti.App.iOS.addEventListener('notification', function(e) {});

Attachments

FileDateSize
app.js2011-08-31T15:36:46.000+00001343
bg.js2011-08-31T15:39:24.000+0000987

Comments

  1. Natalie Huynh 2011-09-07

    Tested with 1.8.0.v20110906155354 with on iPhone 4 4.3.4 iPad2 4.3.5 Simulator 4.0
  2. Don Thorp 2011-11-05

    Standardizing summary and labels.

JSON Source