erisu commented on a change in pull request #1066: Add howto for WKWebViewOnly
URL: https://github.com/apache/cordova-docs/pull/1066#discussion_r393380142
 
 

 ##########
 File path: www/_posts/2020-03-18-wkwebviewonly.md
 ##########
 @@ -0,0 +1,52 @@
+---
+layout: post
+author:
+    name: Niklas Merz
+    url: https://twitter.com/niklasmaerz
+title:  "How To Use 'WKWebViewOnly'"
+categories: howto
+tags: ios
+---
+
+Apple started to reject apps with UIWebView references. The next major version 
of cordova-ios will contain no usage of UIWebView. You might need to update 
your app to fix this before the next version is released and this post sums up 
the required steps.
+
+This should solve the warning after uploading the app to App Store connect:
+
+> ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of 
apps that use UIWebView APIs.
+
+A new so called build flag `WKWebViewOnly` was introduced some versions ago to 
remove all UIWebView references from Cordovas code at build time.
+
+<!--more-->
+
+## Use a WKWebView plugin.
+
+The following example uses the cordova-plugin-wkwebview-engine plugin:
+
+* Add plugin cordova-plugin-wkwebview-engine, preferably the latest version 
1.2.1
+* Add preference attribute CordovaWebViewEngine to the config.xml.
+* Add feature attribute CDVWKWebViewEngine to the config.xml.
+* Add preference `WKWebViewOnly` to the config.xml.
+
+Example config.xml with cordova-plugin-wkwebview-engine plugin
+
+```xml
+<platform name="ios">
+    <preference name="WKWebViewOnly" value="true" />
+
+    <feature name="CDVWKWebViewEngine">
+        <param name="ios-package" value="CDVWKWebViewEngine" />
+    </feature>
+
+    <preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
+</platform>
+```
+
+## Still getting the warning?
+If you are still getting the warning, most likely a plugin that you are using 
still references UIWebView. You will need to identify which plugin and contact 
the plugin developers on their support channel (plugin's repo) and request them 
to fix it. They can either remove the references or make use of this flag to 
wrap the references.
 
 Review comment:
   ```suggestion
   If you are still getting the warning, most likely a plugin that you are 
using still references `UIWebView`. You will need to identify which plugin and 
contact the plugin developers on their support channel (plugin's repo) and 
request them to fix it. They can either remove the references or make use of 
this flag to wrap the references.
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to