Details
-
Type:
Bug
-
Status: Closed
-
Priority:
High
-
Resolution: Fixed
-
Affects Version/s: Release 3.0.2, Release 3.1.0, Release 3.1.1, Release 3.1.2
-
Fix Version/s: 2013 Sprint 19, 2013 Sprint 19 Core, Release 3.2.0
-
Component/s: iOS
-
Labels:None
Description
problem
When referencing commonjs modules in code, iOS device builds do not reference platform specific modules if they are present, instead they reference the non-platform-specific ones. This does not occur on iOS simulator builds, which behave as expected. This makes it impossible to use platform-specific versions of Javascript files on iOS device builds, being a blocker for the linked tickets.
test case
app.js
var win = Ti.UI.createWindow({ |
backgroundColor: '#fff', |
modal: false, |
exitOnClose: true |
});
|
|
win.open();
|
|
require('lib/mylib').sayHello(); |
lib/mylib.js
exports.sayHello = function() { |
alert('hello from the CFG.js (you should never see this)'); |
}
|
iphone/lib/mylib.js
exports.sayHello = function() { |
alert('hello from the iphone CFG.js'); |
}
|
reproduce
- Create a traditional titanium app, adding the files mentioned above.
- Run for iOS simulator
- Confirm that you get the message from the platform-specific mylib.js file: "hello from the iphone CFG.js"
- Now run for an iOS device
- You will get the error described here, where the non-platform-specific module is referenced, giving you the message: "hello from the CFG.js (you should never see this)"
Attachments
Issue Links
- blocks
-
ALOY-760 Generate runtime files to Titanium platform-specific folders
-
- Closed
-
- is dependent of
-
ALOY-783 Alloy: config.json environment-specific global values are ignored, always returning the env:development value
-
- Closed
-
- relates to
-
TIMOB-14683 CLI: Titanium fails to build when only platform-specific app.js is present
-
- Closed
-