[ https://issues.apache.org/jira/browse/CB-10946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16779283#comment-16779283 ]
Sergei commented on CB-10946: ----------------------------- It works if you inject link(to css file) element after 'deviceready' event > dynamically load JS/CSS file into index.html doesn't work with cordova-ios 4.0 > ------------------------------------------------------------------------------ > > Key: CB-10946 > URL: https://issues.apache.org/jira/browse/CB-10946 > Project: Apache Cordova > Issue Type: Bug > Components: Ionic > Affects Versions: 6.0.0 > Environment: Ionic 1.7.14, Cordova 6.0.0, iOS devices > Reporter: Raven Zuo > Priority: Major > > I use a plugin called cordova-app-loader to update our app from resource > server so that if we only change JS/html/css files, we don't need submit to > apple for review. It works perfectly before with old Cordova which generate > iOS3.9.2 build. After upgrading Cordova to 6.0.0, the generated iOS version > is now 4.0.1 and it doesn't work anymore. > I checked into the issue and found that even I remove the updating from > resource server part, only load the js files to index.html dynamically, the > app will freeze after load all the js files. > Details of my current process: > # In my index.html file's head, there is some lib js files like cordova.js > etc. Among them, the last js file is my bootstrap.js > # the bootstrap.js file will read a manifest.json file(which include file > paths need to be add to index.html dynamically) and get all the js files need > be loaded. > # Add all these files into index.html with the following code: > {code} > var el, > head = document.getElementsByTagName('head')[0], > src = the_path_to_the_js_file, > now = Date.now(); > el= document.createElement('script'); > el.type= 'text/javascript'; > el.src= src + '?' + now; > el.async = false; > head.appendChild(el); > {code} > # I added a log message into the last js file which will be dynamically > loaded and in the console window, I saw this message which means the js files > are all loaded. > But then after that, the app just freezes forever. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org