Feature
If two versions of a module are available, and a tiapp.xml doesn't specify a version, the latest version should be chosen.
Current Behavior
Right now the tooling sorts modules alphabetically, so the earliest version of a module will be used rather than the most recent.
Test
Unzip the attached modules.zip in to your /Library/Application\ Support/Titanium/ directory, then:
<modules>
<module>ti.cloud</module>
</modules>
and
require('ti.cloud').hi();
It will alert the version of the module in use. You can also predict which module will be used based on the output of iphone/builder.py:
{quote}
[DEBUG] Detecting modules in /Volumes/Code/play/modules
[DEBUG] Detecting modules in /Library/Application Support/Titanium/modules
[DEBUG] Detected module for commonjs: ti.cloud 2.0 @ /Library/Application Support/Titanium/modules/commonjs/ti.cloud/2.0
[DEBUG] Detected module for commonjs: ti.cloud 2.1 @ /Library/Application Support/Titanium/modules/commonjs/ti.cloud/2.1
[DEBUG] Looking for Titanium Module id: ti.cloud, version:
, platform:
{quote}
The order in which the modules are detected are the order in which they will be used if no version is specified.
Pull Request
https://github.com/appcelerator/titanium_mobile/pull/1650
We need this PR for ACS module.
Mobile web supports this. :)
Yeah, I saw that when I was doing the PR. Great foresight, Chris!
Closing ticket due to time passed.