In detail for the module I've:
- Created a new Mobile Module Project, from Appcelerator Studio, with id (for example) it.module.test
- Inside assets folder, I've created a js file called it.module.test.js
- Into it.module.test.js I have:
Now I package this module directly from Appcelerator Studio and install this module inside a Test Application.
Into this application I do:
And the result is null.
The problem is that the native module classes are being called instead of the CommonJS ones as per the docs.
After several tests, it seems that the problem is the Titanium SDK 4.0.0.
When I create the module project inside Appcelerator Studio and selecting a previous version of Titanium SDK (3.4.1 for example) all works perfectly with the same code.