Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10357] iOS: issue loading 'js' files using a javascript loader from a webView

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-01-15T11:45:21.000+0000
Affected Version/sRelease 2.0.2, Release 2.1.1
Fix Version/sRelease 3.1.0, 2013 Sprint 02 API, 2013 Sprint 02
ComponentsiOS
LabelsSupportTeam, core
ReporterFederico Casali
AssigneeVishal Duggal
Created2012-07-06T10:39:24.000+0000
Updated2013-07-17T10:25:36.000+0000

Description

Problem description

After using a javascript loader in a Webview to load '.js' files, the result is that all 'js' files are missing on the built version. This does happen only on a real iphone/ipad. Not reproducible using the simulatore. Renaming all 'js' files to '_js' does fix the problem

Steps to reproduce

See sample code attached

Run the app. Result: on real devices only the second alert (included in the '_js' file) it's actually triggered. On simulators work fine.

Attachments

FileDateSize
MissingJSFilesBugDemo.zip2012-07-12T21:27:44.000+00001573456

Comments

  1. Ingo Muschenetz 2012-07-06

    Thanks for the report. I believe this might be a Titanium Mobile bug.
  2. Neeraj Gupta 2012-07-11

    This ticket does not have sufficient information to diagnose the issue. Please provide complete information along with Java Script files and the project.
  3. Joel Koett 2012-07-12

    If you run the attached project on a simulator, you'll see two alerts. If you run it on an iOS device, the js file alert doesn't show.
  4. Joel Koett 2012-07-12

    Also, if you do a google search for "_js" and Titanium, you will see plenty of references to the same sort of issue. And I should note: It seems that I need to abstract out the "script src" into local variables, before this bug appears.
  5. Vishal Duggal 2012-12-26

    This is due to minification of all js assets for device builds.
  6. Vishal Duggal 2013-01-15

    The implementation of a custom protocol for local files has resolved this issue.
  7. Vishal Duggal 2013-01-15

    Fixed by PR https://github.com/appcelerator/titanium_mobile/pull/3701 against master
  8. Paras Mishra 2013-07-17

    js files are being loaded using javascript loader. Verified on: Device : iPhone 4S , iOS version : 5.1.1 SDK: 3.1.2.v20130710144553 CLI version : 3.1.1 OS : MAC OSX 10.7.5 Appcelerator Studio, build: 3.1.2.201307161206 XCode : 4.5.1

JSON Source