WaveMaker Docs

WaveMaker Docs

  • Get started
  • Widgets
  • How-to
  • Enterprise
  • Releases
  • Blog
  • Sign-in

›All Blog Posts

All Blog Posts

  • Mitigating Spring Zero-day Vulnerability CVE-2022-22965
  • Archiving WaveMaker 9 Projects
  • URL Change in WaveMaker Android WebView
  • Announcement about Angular 11 Update
  • Mitigating Log4J 2 Vulnerability CVE 2021 44228
  • Ending Support of WaveMaker 9 Projects
  • Git Branching Strategy
  • Important Announcement about Angular 10 Update
  • Accessibility Support in WaveMaker
  • Generating .aab files using wm-cordova-cli or AppChef
  • WaveMaker Studio enables faster database imports
  • Integrate SAP HANA Database with WaveMaker
  • Redshift Database Integration
  • Important Announcement about Changes to Documentation Domain
  • WaveMaker Releases 10.7 Version
  • Theme Builder with some coding (Build + Edit)
  • Understanding Scaling of WaveMaker Applications
  • Automatically Import your Website Branding Styles into a Theme
  • Certificate Pinning Case Study
  • Cordova 10.0.0 Upgrade
  • WaveMaker Releases 10.6 Version
  • Retain UI State in WaveMaker Apps
  • Theme builder is ready with a new update
  • PostgREST OpenAPI support in WaveMaker
  • Fully automated and scalable test execution using k8s
  • New file picker for mobile apps - Improvements in UI to select files in mobile
  • WaveMaker releases 10.5 version
  • Deliver faster applications with WaveMaker!
  • GraphQL in a Micro Services Architecture
  • Build Themes for WaveMaker Apps Without Any Coding
  • COVID-19 Visualization using WaveMaker - Part 2
  • COVID-19 Visualization using WaveMaker - Part 1
  • WaveMaker Integrates with DigitalOcean Kubernetes for App Deployments
  • Deployment Experience made better!
  • OpenAPI support in WaveMaker
  • WaveMaker platform is updated to use WKWebView.
  • Deliver WaveMaker Apps as Micro Frontend Modules
  • All-new WaveMaker docs with a powerful Search
  • Welcome to the WaveMaker Developers Blog

WaveMaker platform is updated to use WKWebView.

April 20, 2020

Srinivasa Rao Boyina

Problem

Apple deprecated UIWebView and introduced WKWebView. Starting from April 1st, 2020, Apple stopped accepting all new apps that have references to UIWebView. From December 2020, Apple will stop accepting app updates that have references to UIWebView. The current version Cordova that is used in WaveMaker, uses UIWebView by default.

WaveMaker allows creation of mobile applications by a simple drag and drop approach. Click here to know more.

Solution

Cordova created a plugin called cordova-plugin-wkwebview-engine. This plugin brings WKWebView of iOS into cordova. Due to its restrictions imposed by WKWebview, two problems araised.

  1. Cordova by default loads index.html using file:// scheme. WKWebView is blocking access from html page (loaded via file://) to files outside of application directory.
  2. UIWebView allowed CORS requests even if CORS is not enabled in the server. But, WKWebView blocks cross-origin requests unless CORS allowed by server. In WaveMaker, CORS is optional.
  3. It doesnot store cookies from third party domains (domains other than the domain that html file is loaded). WaveMaker uses Cookie based authentication.

cordova-plugin-local-webserver is a cordova plugin that serves the app files over http by hosting a server with in the app. This helps in resolving problem1.

cordova-plugin-advanced-http is a cordova plugin that provides API (instead of xhr) to make http calls to the remote server. Using this plugin API, a wrapper is created to replace XHR so that all existing XHR calls work as earlier. This plugin routes all requests through native layer that doesnot block cross-origin requests. This plugin also persist cookies from all domains and send them in appropriate requests. This plugin helps in resolving problem 2 and 3.

In addition to the above, Cordova framework and plugins may have references to UIWebView. Cordova team addressed these framework level changes in cordova-ios@5.1.0. They added a preference called 'WKWebViewOnly'. If this preference is set to 'true', then UIWebView references in the cordova framework are replaced with WKWebView. Out of all the plugins that are supported by WaveMaker, cordova-plugin-inappbrowser has UIWebView reference. cordova-plugin-inappbrowser removed those references in version 3.2.0. So, that plugin is upgraded to 3.2.0.

Developer Action Required

With WaveMaker 10.4 release, platform has no references to UIWebView. Developer has to make sure that all third party plugins (if any) also have no references to UIWebView in their code. If references are present, contact respective plugin-developer for a newer version of the plugin.

Known Issues

  1. cordova-ios@5.1.0 is not supported by build.phonegap.com. When publishing new app, ipa has to be created manually. For all development builds (even for new) and distribution builds for app updates, phonegap service can still be used.
  2. While uploading a file, there is no pogress event avaiable in cordova-plugin-advanced-http plugin. Currently, a synthetic progress event is created which just mimics but doesnot corelate with the actual progress of operation.

References

  1. Apache Cordova blog about using WKWebView. https://cordova.apache.org/howto/2020/03/18/wkwebviewonly.html
  2. Issue with WKWebView. https://github.com/apache/cordova-plugin-wkwebview-engine/issues/56
  3. Cookie Issue with WKWebView. https://bugs.webkit.org/show_bug.cgi?id=140205
  4. Progress issue in cordova-plugin-advanced-http. https://github.com/silkimen/cordova-plugin-advanced-http/issues/88
Tweet
Recent Posts
  • Problem
  • Solution
  • Known Issues
  • References
WaveMaker
  • PRICING
  • PARTNERS
  • CUSTOMERS
  • ABOUT US
  • CONTACT US
Terms of Use | Copyright © 2013-2022 WaveMaker, Inc. All rights reserved.