UIWebView references in blank project

Hi there,

I am going through a nightmare regarding the UIWebView depreciation. I am in the process of identifying the cordova plugins and hopefully will find solutions. However, when I start from a blank ionic project, I still see references with respect to UIWebView and puzzled by it. Below please find the steps I followed:

  1. ionic start testProject blank --cordova
  2. Add the below into the ios section of the config.xml:
<preference name="WKWebViewOnly" value="true" />
<feature name="CDVWKWebViewEngine">
      <param name="ios-package" value="CDVWKWebViewEngine" />
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
  1. ionic cordova prepare ios
  2. cd platforms/ios
  3. grep -Ri UIWebView

At this point, I see references at CDVUIWebViewEngine.m

If I were to install the following:

ionic cordova plugin add cordova-plugin-inappbrowser
npm install @ionic-native/in-app-browser

I also see references related to inappbrowser

I am not sure what is going on with such a basic structure. I’d grateful for any pointer you may have as I have been pulling my hairs for the last two days.

Below is my setup:


   Ionic CLI                     : 6.7.0 (/home/doug/.npm-global/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.1.1
   @angular-devkit/build-angular : 0.901.7
   @angular-devkit/schematics    : 9.1.7
   @angular/cli                  : 9.1.7
   @ionic/angular-toolkit        : 2.2.0


   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : ios 5.1.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 6 other plugins)


   cordova-res                          : 0.14.0
   native-run (update available: 1.0.0) : 0.2.9



Which Cordova Version for Ios? 5.1.1? This Version still has some References but they are disabled by compile Time via <preference name="WKWebViewOnly" value="true"></preference>.

btw: cordova-ios@6.0.0 is release, which completely drops UiWebView.

1 Like

Many thanks; switched over to cordova-ios@6.0.0 and it works fine.

I’m using cordova-ios@6.0.0. But still my app is getting rejected from app store duew to UIWebView error. Please help me and m not using in-app-browser plugin though…

Hi Anjali,

It should not have happened as cordova-ios@6.0.0 removed UIWuebView. I’d encourage you to do a grep under platforms/ios for UIWebView. Many other plugins still use UIWebView unfortunately such as admobfree, share, etc.

Once you figure out the plugin that causes it, either update your plugin or remove it if there is not any solution to switch over from UIWebView.

I hope this helps…


Hi @doug1e, thank you for quick reply. I will try what you just said.

@doug1e This is my plugins list

Checking com.googlemaps.ios for pods.

Checking com.razorpay.cordova for pods.

com.razorpay.cordova requires pod: razorpay-pod

Checking com.telerik.plugins.nativepagetransitions for pods.

Checking cordova-plugin-actionsheet for pods.

Checking cordova-plugin-add-swift-support for pods.

Checking cordova-plugin-android-permissions for pods.

Checking cordova-plugin-crop for pods.

Checking cordova-plugin-device for pods.

Checking cordova-plugin-dialogs for pods.

Checking cordova-plugin-file for pods.

Checking cordova-plugin-file-transfer for pods.

Checking cordova-plugin-filepath for pods.

Checking cordova-plugin-geolocation for pods.

Checking cordova-plugin-googlemaps for pods.

Checking cordova-plugin-nativegeocoder for pods.

Checking cordova-plugin-networkinterface for pods.

Checking cordova-plugin-splashscreen for pods.

Checking cordova-plugin-statusbar for pods.

Checking cordova-plugin-whitelist for pods.

Checking cordova-plugin-x-socialsharing for pods.

Checking cordova-sms-plugin for pods.

Checking es6-promise-plugin for pods.

Checking mx.ferreyra.callnumber for pods.

Checking phonegap-plugin-barcodescanner for pods.

Checking phonegap-plugin-push for pods.

phonegap-plugin-push requires pod: FirebaseMessaging

Could you tell me which plugin causes the issue?

I know socialsharing uses but I would recommend to do a grep under platforms/ios, which should tell you exactly the names of the plugins

I use Socialsharing Version 5.6.8 and don’t have any Problems with UiWebView References. As i said before: Just search for UiWebView References in xCode and check their Occurrences and from which Plugins they are.

I fount out where the issue was… com.telerik.plugins.nativepagetransitions this plugin uses UIWebView reference. I removed it and successfully deployed the app on App store.

Thanks You.

1 Like