简体   繁体   中英

IBM Worklight 5 - iOS app shows white screen on second launch

I'm having a problem with a hybrid app for iOS which I have written using Worklight 5. The problem is that the application only runs properly the first time it is launched, and after being closed in multi-tasking and relaunched, the app will not open properly and instead displays a white screen. The only way to get the application to run again is to delete it from the device completely and then re-install it.

This behaviour is the same in the iPad simulator and on a physical iPad.

I don't have any code to provide as all of the Objective-C is generated by Worklight and all I have written is the HTML5, CSS3 and Javascript and I think that's unlikely to be affecting it. Has anybody else experienced this issue and if so is there a way to resolve this problem? Thanks.

Actually the behavior sounds to me much more inline with changing the name of the HTML file itself and in application-descriptor.xml's mainFile element. Have you touched these? If yes, then you also need to change the name of the application's folder.

Here's something to try:

  1. Open cordova.js inside the Xcode project.
  2. Replace: execXhr.open('HEAD', "/!gap_exec", true);
  3. With execXhr.open('HEAD', "/!gap_exec?" + +new Date, true); .

It's from a fix that was applied to Cordova 2.4. It adds a timestamp to the query param to prevent caching .

No idea if that will help, it sounds vaguely familiar to an issue I ran into.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM