Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2462] Fail to use Titanium functions in commonJS module

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNeeds more info
Resolution Date2013-04-02T01:16:32.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsn/a
ReporterSungil Kim
AssigneeMauro Parra-Miranda
Created2012-11-28T08:51:28.000+0000
Updated2016-03-08T07:41:30.000+0000

Description

I'm using functions like Ti.UI.iPhone.createNavigationGroup(); in a commonJS module. An I'm using that module by var Window = require('/modules/Window'); It works with the simulator, but if I *publish the .ipa for distribution(Ad hoc)* and run on the device, this kind of error occurs : {{[ERROR] Application received error: 'undefined' is not a function (evaluating 'Ti.UI.iPhone.createNavigationGroup({ window: instance })') at Window.js (line 34)}} I found that if I use the Ti.UI.iPhone.createNavigationGroup() function once in app.js, than the problem is solved. It seems like functions only used in the modules are not included for build. Thank you.

Comments

  1. Pedro Enrique 2013-04-01

    Needs more info. Provide a simple producible test app.

JSON Source