Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15843] iOS: App closes without warning when getting the events between 2 dates

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2014-09-19T10:17:04.000+0000
Affected Version/sRelease 3.1.3
Fix Version/sRelease 3.4.0
ComponentsiOS
LabelsiOS
Reporterjithinpv
AssigneeIngo Muschenetz
Created2013-11-28T06:16:20.000+0000
Updated2014-09-26T00:13:51.000+0000

Description

Run the following app.js in iOS simulator. The app will close without a warning.
var startDate = new Date(2012, 03, 10, 12, 0, 0);
var endDate = new Date(2012, 03, 19, 14, 0, 0);
 
        var out = [];
        var calendars = Ti.Calendar.allCalendars;
        Ti.API.info('-> '+JSON.stringify(calendars));
        for (var i=0; i < calendars.length; i++) {
            Ti.API.info('=> '+JSON.stringify(calendars[i]));
                var cal_events = calendars[i].getEventsBetweenDates(startDate,endDate);
 
                for (var j=0; j < cal_events.length; j++) {
                    out.push(cal_events[j]);
                };
        };

Console output

[INFO] : -> [{},{}] [INFO] : => {} -- End simulator log --------------------------------------------------------- [ERROR] : An error occurred running the iOS Simulator [ERROR] : [ERROR] : Project failed to build after 28s 263ms

Comments

  1. Shameer Jan 2014-09-19

    Issue exist with 3.1.3 but can't reproduce on 3.4.0 Appcelerator Studio, build: 3.3.0.201407111535 TiSDK 3.4.0 iOS : 6.1 Titanium Command-Line Interface, CLI version 3.3.0
  2. Ewan Harris 2014-09-26

    Verified fix on: Mac OSX 10.9.4 Appcelerator Studio, build: 3.4.0.201409231834 Titanium SDK build: 3.4.0.v20140925154326 Titanium CLI, build: 3.4.0-rc4 Alloy: 1.5.0-rc5 Xcode6.0.1 iPhone 6 (8.0), iPhone 6 Simulator (8.0), iPhone 5s Simulator (7.1) Ran the code on the above platforms and the app no longer closes without warning. Closing ticket.

JSON Source