Ionic 3 ITMS-90809: Deprecated API Usage: Getting rejected even after using WKWebView

Hello,

My app is getting rejected by Apple even after I use WKWebView.

I have an Ionic 3 app with cordova-ios 4.5.5. I followed This article to overcome UIWebView issue. Unfortunately, it’s not working.

Below are the steps I performed:

  • Ran cordova plugin add cordova-plugin-wkwebview-engine.
  • Added below tags in config.xml file under <platform name="ios"> tag:
    • <feature name="CDVWKWebViewEngine">
          <param name="ios-package" value="CDVWKWebViewEngine" />
      </feature>
      <preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
      <preference name="WKWebViewOnly" value="true" />
      
  • Removed node_modules folder and ran npm i.
  • cordova platform remove ios.
  • cordova platform add ios.
  • Delete www folder.
  • Followed by the build process in the terminal and XCode.

Am I missing any step?

Note: I cannot upgrade my node or ionic as the project is very sensitive and the build fails. But as per the article this should work for cordova-ios@4.* - 5.*

I doubt some of my plugins use UIWebView. Below is the list of plugins in my project:

Plugins used:

    <plugin name="cordova-plugin-network-information" spec="^2.0.1" />
    <plugin name="cordova-plugin-advanced-http" spec="^1.9.1" />
    <plugin name="cordova-plugin-whitelist" spec="^1.3.1" />
    <plugin name="cordova-plugin-statusbar" spec="^2.2.2" />
    <plugin name="cordova-plugin-splashscreen" spec="^4.0.3" />
    <plugin name="cordova-plugin-app-version" spec="^0.1.9" />
    <plugin name="cordova-plugin-android-permissions" spec="~1.0.0" />
    <plugin name="cordova-plugin-file-transfer" spec="~1.7.1" />
    <plugin name="cordova-plugin-file-opener2" spec="^2.0.19" />
    <plugin name="cordova.plugins.diagnostic" spec="4.0.0" />
    <plugin name="cordova-plugin-x-socialsharing" spec="^5.3.1" />
    <plugin name="cordova-plugin-geolocation" spec="^4.0.1" />
    <plugin name="com-sarriaroman-photoviewer" spec="^1.1.16" />
    <plugin name="cordova-clipboard" spec="^1.1.1" />
    <plugin name="cordova-plugin-camera" spec="^4.0.2" />
    <plugin name="cordova-plugin-firebase" spec="^0.1.25" />
    <plugin name="com.telerik.plugins.nativepagetransitions" spec="^0.6.5" />
    <plugin name="cordova-plugin-file" spec="^6.0.1" />
    <plugin name="cordova-plugin-screen-orientation" spec="^3.0.1" />
    <plugin name="ionic-plugin-keyboard" spec="2.2.1" />
    <plugin name="cordova-plugin-zip" spec="^3.1.0" />
    <plugin name="cordova-plugin-code-push" spec="^1.11.12" />
    <plugin name="cordova-plugin-stripe" spec="^1.5.3" />
    <plugin name="cordova-plugin-local-notification" spec="^0.9.0-beta.2" />
    <plugin name="org.devgeeks.Canvas2ImagePlugin" spec="https://github.com/devgeeks/Canvas2ImagePlugin.git" />
    <plugin name="phonegap-plugin-mobile-accessibility" spec="https://github.com/phonegap/phonegap-mobile-accessibility.git" />
    <plugin name="cordova-plugin-nativegeocoder" spec="^3.2.2">
        <variable name="LOCATION_WHEN_IN_USE_DESCRIPTION" value="Use geocoder service" />
    </plugin>
    <plugin name="cordova-plugin-ios-keychain" spec="^3.0.1" />
    <plugin name="cordova-plugin-document-viewer" spec="^0.9.13" />
    <plugin name="cordova-plugin-device" spec="1.1.4" />
    <plugin name="cordova-plugin-nativestorage" spec="^2.3.2" />
    <plugin name="cordova-plugin-inappbrowser" spec="https://github.com/apache/cordova-plugin-inappbrowser.git" />

Can you please list out which all are using UiWebView?

I had tried upgrading some of the below:

  • cordova-plugin-x-socialsharing - Upgraded to 6.0.3
  • cordova-plugin-code-push - Upgraded to 2.0.0
  • com.telerik.plugins.nativepagetransitions - Upgraded to 0.7.0
  • cordova-plugin-inappbrowser - Upgraded to 5.0.0

Also tried removing below:

  • Ionic-plugin-keyboard
  • cordova-plugin-firebase
  • cordova-plugin-file-transfer
  • Canvas2ImagePlugin

Ionic Info:

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

global packages:

    cordova (Cordova CLI) : 8.0.0 

local packages:

    @ionic/app-scripts : 3.1.9
    Cordova Platforms  : ios 4.5.5
    Ionic Framework    : ionic-angular 3.9.2

System:

    ios-deploy : 1.9.2 
    Node       : v10.0.0
    npm        : 5.6.0 
    OS         : macOS
    Xcode      : Xcode 13.1 Build version 13A1030d 

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro

It’s been a long time since I was using ionic 3, as far as I remember I’ve had the same kind of troubles and for that i’ve updated my app to Ionic 4 (and then ionic 5 and 2 days ago Ionic 6).
It will take a little time and some “sacrifice” but it totally worth it.

Hi @ciccilleju thank you for the reply. The project which I am working on is really big and will require months for migrating and testing. So was looking for a quick fix.

OK. So finally I was able to deploy it. I have upgraded cordova-ios to 6 and some of my plugins to their latest version and had to remove the firebase plugin.

Plugins upgraded:

  • cordova-plugin-x-socialsharing
  • cordova-plugin-code-push
  • com.telerik.plugins.nativepagetransitions

Plugins removed:

  • cordova-plugin-firebase

Now for firebase, as per the article in my question, they suggested migrating to Capacitor’s firebase plugin. Is there a way where I can add the Capacitor plugin to the existing Cordova project?

I’m sorry but you can’t use capacitor plugins in a Cordova Project, you can do viceversa.
That’s why i’ve suggested to migrate to capacitor 3: Capacitor is the future of Ionic, it has a “live” support-community and it is updated frequently.

Migrating, even if your project is really big, is a thing you have to do, eventually, for your app’s sake.