Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-24796] iOS: Hybrid CommonJS and Native modules don't handle multiple js files #9131

Merged
merged 4 commits into from Jun 15, 2017

Conversation

sgtcoolguy
Copy link
Contributor

@sgtcoolguy sgtcoolguy commented Jun 8, 2017

JIRA: https://jira.appcelerator.org/browse/TIMOB-24796

Description:
Fixes require resolution for js files living in the assets folder of a "native" module. Specifically, simply avoid mangling the filenames.

We hand titanium_prep a list of JS files to encrypt into a class, that uses a map of file paths to indices that then look up a block of bytes. Our require behavior for encrypted assets was changing '.' to '_' in the file paths first. This is because our old python-based module build for iOS would mangle filenames in the same way for js files in the assets folder. (In fact we still do mangle filenames like this in normal apps' JS files on device when encrypting, and we convert to the mangled name in TiUtils.m)

This fix looks for the non-mangled name first (because that's what the Node-js based module builds produce, and because name mangling doesn't seem to gain us anything); then falls back to trying the mangled name next.

@mukherjee2 mukherjee2 merged commit 1bccffb into tidev:master Jun 15, 2017
@mukherjee2
Copy link
Contributor

FR Passed. Details are in PR/9131.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants