Skip to content
This repository has been archived by the owner on Oct 6, 2021. It is now read-only.

Migrate to WKWebView (iOS) #236

Open
ruisalgado opened this issue Aug 9, 2018 · 1 comment
Open

Migrate to WKWebView (iOS) #236

ruisalgado opened this issue Aug 9, 2018 · 1 comment

Comments

@ruisalgado
Copy link
Member

Current default (UIWebView) is deprecated:

https://cordova.apache.org/news/2018/08/01/future-cordova-ios-webview.html

@pascalw
Copy link
Member

pascalw commented Aug 13, 2018

Unfortunately there are quite a few caveats, though well documented:

Limitations of WKWebView

There are many limitations of WKWebview, especially if you were using UIWebView previously. The limitations are:

  • Cookies don't persist. This is a WebKit bug, but someone has created a plugin for a workaround.

  • Can't delete cookies. This is/was a WebKit bug (2015), we need to test for the iOS 11/12.

  • Can't execute JavaScript code in the background. There are several issues related to this.

  • XmlHttpRequests don't work, because of Cross-Origin Resource Sharing issue (CORS). There is a workaround plugin created by Oracle (UPL licensed, which is Apache-2.0 compatible).

  • Migration of localStorage from UIWebView. There is a migration plugin available.

  • iframes will not be supported any longer (they are now CORS restricted in WKWebView), and may be partially or completely broken. This may lead to incompatibilities with the same code in other Cordova platforms.

  • Known issues with WKWebView on iOS pre-11 which will be deprecated and dropped in a future Cordova release

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants