IOS9 上的 Worklight Hybrid 应用程序后退按钮问题
Worklight Hybrid app back button issue on IOS9
Worklight 混合应用程序后退按钮在 IOS9 上损坏,因为以下代码段损坏。
window.history.back();
按照以下link解决方案是使用 WKWebView 而不是 UIWebView。
https://github.com/jquery/jquery-mobile/issues/8254
我们正在使用生成 IOS 代码的 worklight 6.2.x,是否有其他方法可以解决此问题?
它在 Worklight Hybrid 应用程序中的工作方式是 Cordova 的 ViewController 用于显示、呈现 Web 资源 - 应用程序。这个ViewController是Cordova自带的(不能被替换)用的是iOS的UIWebView
因此,直到 Cordova 通过从使用 UIWebView 转向使用 WKWebView 在 Cordova 代码库中解决此问题之前,此缺陷无法在 Worklight 生成的混合应用程序中修复 - 因为它们使用 Cordova 提供的内容。
作为一种可能的解决方法,也许您可以像在此处的多页应用程序中那样实现导航:https://github.com/MobileFirst-Platform-Developer-Center/MultiPageApp/blob/release71/apps/MultiPageApp/common/js/main.js
示例项目旨在 运行 MobileFirst Platform Foundation 7.1,但 JavaScript 在 Worklight 6.2 中也是相同的。
在 JQuery Mobile 中发现配置更改解决了此问题。
Problems with window.history using JQuery/Javascript on Cordova app in IOS9
Worklight 混合应用程序后退按钮在 IOS9 上损坏,因为以下代码段损坏。
window.history.back();
按照以下link解决方案是使用 WKWebView 而不是 UIWebView。
https://github.com/jquery/jquery-mobile/issues/8254
我们正在使用生成 IOS 代码的 worklight 6.2.x,是否有其他方法可以解决此问题?
它在 Worklight Hybrid 应用程序中的工作方式是 Cordova 的 ViewController 用于显示、呈现 Web 资源 - 应用程序。这个ViewController是Cordova自带的(不能被替换)用的是iOS的UIWebView
因此,直到 Cordova 通过从使用 UIWebView 转向使用 WKWebView 在 Cordova 代码库中解决此问题之前,此缺陷无法在 Worklight 生成的混合应用程序中修复 - 因为它们使用 Cordova 提供的内容。
作为一种可能的解决方法,也许您可以像在此处的多页应用程序中那样实现导航:https://github.com/MobileFirst-Platform-Developer-Center/MultiPageApp/blob/release71/apps/MultiPageApp/common/js/main.js
示例项目旨在 运行 MobileFirst Platform Foundation 7.1,但 JavaScript 在 Worklight 6.2 中也是相同的。
在 JQuery Mobile 中发现配置更改解决了此问题。
Problems with window.history using JQuery/Javascript on Cordova app in IOS9