{ "id": "105605", "key": "AC-2462", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2013-04-02T01:16:32.000+0000", "created": "2012-11-28T08:51:28.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:41:30.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "I'm using functions like {{Ti.UI.iPhone.createNavigationGroup();}} in a commonJS module.\r\nAn I'm using that module by\r\n\r\n{{var Window = require('/modules/Window');}}\r\n\r\nIt works with the simulator, but if I *publish the .ipa for distribution(Ad hoc)* and run on the device, this kind of error occurs :\r\n\r\n{{[ERROR] Application received error: 'undefined' is not a function (evaluating 'Ti.UI.iPhone.createNavigationGroup({\r\n\t\t\t\t\twindow: instance\r\n\t\t\t\t})') at Window.js (line 34)}}\r\n\r\nI found that if I use the Ti.UI.iPhone.createNavigationGroup() function once in app.js, than the problem is solved.\r\n\r\nIt seems like functions only used in the modules are not included for build.\r\n\r\nThank you.", "attachment": [], "flagged": false, "summary": "Fail to use Titanium functions in commonJS module", "creator": { "name": "adreamer21", "key": "adreamer21", "displayName": "Sungil Kim", "active": true, "timeZone": "Asia/Tokyo" }, "subtasks": [], "reporter": { "name": "adreamer21", "key": "adreamer21", "displayName": "Sungil Kim", "active": true, "timeZone": "Asia/Tokyo" }, "environment": "- SDK : 2.1.4.GA\r\n- Target Platform : iOS\r\n- Titanium Studio 2.1.2.201208301612, OS X 10.8.2", "comment": { "comments": [ { "id": "245034", "author": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Needs more info. Provide a simple producible test app.", "updateAuthor": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-04-01T21:40:01.000+0000", "updated": "2013-04-01T21:40:01.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }