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 <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to