You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/07/12 11:57:21 UTC

[GitHub] [cordova-ios] mosabab edited a comment on issue #938: App Stuck on Splash screen

mosabab edited a comment on issue #938:
URL: https://github.com/apache/cordova-ios/issues/938#issuecomment-657211907


   This maybe because your HTML and JS not perform well.
   
   The best you can do is to make `cordova.js` the first javascript file to run in your project like this:
   
   `<html>`
   `....`
   `....`
   ` <script src="cordova.js"></script>`
   `<script src="js/index.js"></script>`
   `</body>`
   `<html>`
   
   And for `index.js` it should looks like this:
   
   `document.addEventListener('deviceready', onDeviceReady, false);`
   
   `function onDeviceReady() {`
      ` // Cordova is now initialized. Have fun!`
   
       `console.log('Running cordova-' + cordova.platformId + '@' + cordova.version);`
       `document.getElementById('deviceready').classList.add('ready');`
   `}`
   
   So, you should not run and js code before Cordova.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org