简体   繁体   English

IBM Worklight 5-iOS应用在第二次启动时显示白屏

[英]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: 可以尝试以下方法:

  1. Open cordova.js inside the Xcode project. 在Xcode项目中打开cordova.js
  2. Replace: execXhr.open('HEAD', "/!gap_exec", true); 替换: execXhr.open('HEAD', "/!gap_exec", true);
  3. With 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.

相关问题 IBM Worklight 6.0-iOS应用始终停留在第二次启动时 - IBM Worklight 6.0 - iOS app always stuck on the second launch Flutter iOS 应用程序在启动时显示白屏并在该屏幕上挂断 - Flutter iOS app showing white screen on launch and hang up on that screen Cordova IOS 应用程序在 IOS 14 中显示白屏 - Cordova IOS app shows white screen in IOS 14 在iOS 11上启动屏幕后,React Native应用程序闪烁白色 - React Native app flashing white after launch screen on iOS 11 flutter ios 应用程序在测试飞行模式下显示白屏? - flutter ios app shows white screen in testflight mode? cordova package iOS 应用程序显示白屏错误? - cordova package iOS app shows white screen error? iPad应用程序在iOS 10中将应用程序图标显示为启动屏幕 - iPad Application shows app icon as launch screen in iOS 10 MPMoviePlayerController在启动前显示空白屏幕? - MPMoviePlayerController shows blank white screen before launch? IBM Worklight 6.0-在iOS中控制启动画面时出现问题 - IBM Worklight 6.0 - Issue in controlling the splash screen in iOS IBM Worklight-如何在本机iOS应用程序中启用应用程序真实性? - IBM Worklight - How to enable App Authenticity in a native iOS app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM