You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ni...@apache.org on 2020/01/11 14:23:03 UTC

[cordova-docs] branch wkwebviewonly created (now 659bf88)

This is an automated email from the ASF dual-hosted git repository.

niklasmerz pushed a change to branch wkwebviewonly
in repository https://gitbox.apache.org/repos/asf/cordova-docs.git.


      at 659bf88  Add WKWebView only post

This branch includes the following new commits:

     new 659bf88  Add WKWebView only post

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[cordova-docs] 01/01: Add WKWebView only post

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

niklasmerz pushed a commit to branch wkwebviewonly
in repository https://gitbox.apache.org/repos/asf/cordova-docs.git

commit 659bf88348a73a950899c87a5e7d2708138546be
Author: Niklas Merz <ni...@apache.org>
AuthorDate: Sat Jan 11 15:21:17 2020 +0100

    Add WKWebView only post
---
 www/_posts/2020-01-18-howto-use-wkwebviewonly.md | 28 ++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/www/_posts/2020-01-18-howto-use-wkwebviewonly.md b/www/_posts/2020-01-18-howto-use-wkwebviewonly.md
new file mode 100644
index 0000000..fc68ba5
--- /dev/null
+++ b/www/_posts/2020-01-18-howto-use-wkwebviewonly.md
@@ -0,0 +1,28 @@
+---
+layout: post
+author:
+    name: Niklas Merz
+    url: https://twitter.com/niklasmaerz
+title:  "How to use the WKWebViewOnly compile flag to avoid the UIWebView deprecation warning"
+categories: howto
+tags: cordova-ios uiwebview wkwebview webview roadmap
+---
+
+As of August 2019, Apple is now showing a deprecation warning when uploading apps to the App Store that include UIWebView-related code. UIWebView has been unofficially deprecated in favour of the new WKWebView for a while, but Apple has now made it officially deprecated. As a result, all Cordova apps built for iOS will receive this deprecation warning on upload.
+
+## Requirements
+
+The goal of this post is explain how to use the `WKWebViewOnly` preference for apps that are **already using WKWebView** right now. Migrating from UIWebView to WKWebView requires some additional considerations.
+
+The `WKWebViewOnly` preference was introduced with 5.1.0 and is supported by `cordova-plugin-inappbrowser` 3.2.0 and higher.
+
+<!--more-->
+## How it works
+
+If you want to remove all UIWebView from your app bundle you submit to the App Store, you should set this preference to the config.xml file in the iOS part:
+
+`<preference name="WKWebViewOnly" value="true" />`
+
+After adding this preference you need to remove the iOS platform and add it again. With this setting enabled the compiler will not add any UIWebView code to your app and the warning after submitting to the App Store should disappear. The InAppBrowser plugin now will only use WKWebView as well, if it is installed in your app.
+
+**Note**: Other plugins may still use UIWebView references. Please check all your plugins, if you still get the warning.
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org