[TIMOB-16786] iOS: Module relative path resolution does not work anymore
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Low |
| Status | Closed |
| Resolution | Invalid |
| Resolution Date | 2018-11-16T15:43:23.000+0000 |
| Affected Version/s | Release 3.2.2 |
| Fix Version/s | n/a |
| Components | iOS |
| Labels | commonJS, path, relative, require |
| Reporter | carlo |
| Assignee | Unknown |
| Created | 2014-03-21T15:22:30.000+0000 |
| Updated | 2018-11-16T15:43:23.000+0000 |
Description
Can't run the example from docs: https://wiki.appcelerator.org/display/guides/CommonJS+Modules+in+Titanium#CommonJSModulesinTitanium-JavaScriptModulePathResolution
"./" seems point to alway point to "Resources"
"../" give substringToIndex error
Android works as expected.
var myModule = require("../lib/myModule")();
//[ERROR] : Script Error * -[__NSCFConstantString substringToIndex:]: Index 1 out of bounds; string length 0
var SomeOtherCustomView = require('../widgets/SomeOtherCustomView')();
//[ERROR] : Script Error Couldn't find module: ./widgets/SomeOtherCustomView
Project from guide example attached
Attachments
| File | Date | Size |
|---|---|---|
| test path.zip | 2014-03-21T15:22:30.000+0000 | 639893 |
Moving this ticket to engineering based on Mr. Rahman's verification.
This ticket is quite outdated, this should work fine now.