[英]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. 我使用Worklight 5编写的iOS混合应用程序出现问题。问题在于该应用程序仅在首次启动时才能正常运行,并且在多任务中关闭并重新启动后,该应用程序将无法正确打开,而是显示白屏。 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. 在iPad模拟器和物理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. 我没有任何代码可提供,因为所有的Objective-C都是由Worklight生成的,而我编写的只是HTML5,CSS3和Javascript,我认为这不太可能影响它。 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. 实际上,对于我来说,这种行为与更改HTML文件本身的名称以及在application-descriptor.xml的
mainFile
元素中更加内联。 Have you touched these? 你碰过这些吗? If yes, then you also need to change the name of the application's folder.
如果是,则还需要更改应用程序文件夹的名称。
Here's something to try: 可以尝试以下方法:
cordova.js
inside the Xcode project. cordova.js
。 execXhr.open('HEAD', "/!gap_exec", true);
execXhr.open('HEAD', "/!gap_exec", true);
execXhr.open('HEAD', "/!gap_exec?" + +new Date, true);
execXhr.open('HEAD', "/!gap_exec?" + +new Date, true);
. It's from a fix that was applied to Cordova 2.4. 这是从已应用于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. 不知道这是否会有所帮助,我遇到的一个问题听起来有点熟悉。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.