[AC-2462] Fail to use Titanium functions in commonJS module
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Needs more info |
Resolution Date | 2013-04-02T01:16:32.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | n/a |
Reporter | Sungil Kim |
Assignee | Mauro Parra-Miranda |
Created | 2012-11-28T08:51:28.000+0000 |
Updated | 2016-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.
Needs more info. Provide a simple producible test app.