Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16621] iOS: Limit on number of times Ti.App.iOS.scheduleLocalNotification can be used

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-05-07T16:59:13.000+0000
Affected Version/sn/a
Fix Version/s2014 Sprint 09, 2014 Sprint 09 SDK, Release 3.3.0
ComponentsiOS
LabelsAPP-837829, module_notification_manager, qe-closed-3.3.0, qe-testadded
ReporterSeth Toda
AssigneeSabil Rahim
Created2014-03-13T01:07:48.000+0000
Updated2014-05-08T06:47:01.000+0000

Description

Scheduling 3 or more notifications with Ti.App.iOS.scheduleLocalNotification renders either no notifications or just the last one. Is there a limit on the number of notifications that can be scheduled or the frequency in which they are scheduled? Currently using millisecond time to ensure unique id. Sample app attached
function doClick(e) {
    alertTime = new Date(new Date().getTime()+15000);

    var newNotification = Ti.App.iOS.scheduleLocalNotification({
        alertBody : "Did you take your dose at ?"+alertTime.getTime(),
        userInfo : {"id": alertTime.getTime()},
        date : alertTime
    });
    alert('scheduled '+alertTime.getTime() + " alert");


}

// Example cancel of last notification
function unClick(e) {
    alert('cancelling ' +alertTime.getTime());
    Ti.App.iOS.cancelLocalNotification(alertTime.getTime());
}


$.index.open();

Steps to reproduce:

1. Click on schedule label three times to schedule three notifications (each has a time 15 sec from now). 2. Exit App 3. Either one, or no local notifications will appear in the notification center.

Attachments

FileDateSize
localNotify.zip2014-03-13T01:07:48.000+00009442025
localNotify2.zip2014-03-17T21:48:32.000+00009442679

Comments

  1. Seth Toda 2014-03-31

    [~srahim], what will the native code show us? Possibly that the limit/restriction is out of our control?
  2. Seth Toda 2014-04-08

    Update: This appears to be our bug. Native worked as expected. Thread-related issue. Anything else I can provide to the customer [~srahim]?
  3. Seth Toda 2014-04-21

    Any update on this?
  4. Sabil Rahim 2014-05-06

    https://github.com/appcelerator/titanium_mobile/pull/5666
  5. Vishal Duggal 2014-05-07

    CR+FR
  6. Priya Agarwal 2014-05-08

    Verified the FIXED with: Appc-Studio:3.3.0.201405011408 sdk:3.3.0.v20140507163312 acs:1.0.14 alloy:1.4.0-dev npm:1.3.2 titanium:3.3.0-dev titanium-code-processor:1.1.1 xcode:5.1.1 Device:Iphone5s(v7.1.1) Able to get all the number of notifications. Hence Closing the issue as working as expected.

JSON Source