0

I did quite a research on this one, and even though it is a very common issue none of the solutions worked for me so I keep getting the dreaded: ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability

My configuration is this:

Ionic:

   Ionic CLI          : 6.10.1 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.4

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.1.0, ios 4.2.0, windows 4.4.2
   Cordova Plugins   : cordova-plugin-ionic-webview 5.0.0, (and 13 other plugins)

Utility:

   cordova-res : not installed
   native-run  : not installed

System:

   NodeJS : v10.16.2 (/usr/local/bin/node)
   npm    : 6.14.5
   OS     : macOS Catalina
   Xcode  : Xcode 11.5 Build version 11E608c

Plugins:

com.verso.cordova.clipboard 0.1.0 "Clipboard"
cordova-clipboard 1.3.0 "Clipboard"
cordova-plugin-camera 4.1.0 "Camera"
cordova-plugin-crop 0.3.1 "CropPlugin"
cordova-plugin-device 1.1.4 "Device"
cordova-plugin-file 6.0.2 "File"
cordova-plugin-ionic-webview 5.0.0 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.4.1 "StatusBar"
cordova-plugin-whitelist 1.3.1 "Whitelist"
cordova-plugin-x-socialsharing 5.6.3 "SocialSharing"
cordova-plugin-x-toast 2.6.0 "Toast"
cordova-sqlite-storage 2.2.0 "Cordova sqlite storage plugin"
es6-promise-plugin 4.2.2 "Promise"
ionic-plugin-keyboard 2.2.1 "Keyboard"
phonegap-plugin-barcodescanner 7.0.2 "BarcodeScanner"
uk.co.workingedge.cordova.plugin.sqliteporter 1.1.1 "sqlite porter"

Could anyone identify something that screams "this one uses UIWebView and you should change it!" ?

UPDATE:

In order to fix the issue I followed these steps:

  • Made sure that cordova-plugin-ionic-webview was in version >= 5.0.0
  • Added
<platform name="ios">
    <preference name="WKWebViewOnly" value="true" />
    ...
</platform>

To config.xml

  • updated ionic npm install -g ionic@latest
  • updated cordova npm install -g cordova@latest
  • updated ionic scripts npm install @ionic/app-scripts@latest
  • Then removed the iOS platform ionic cordova platform rm ios
  • Re-added the iOS platform ionic cordova platform add ios
  • and rebuild it ionic cordova prepare ios
MDompekidis
  • 335
  • 4
  • 13
  • what cordova ios version are you using?? Run command: `ionic cordova platform ls` and post result – Najam Us Saqib Jun 18 '20 at 12:06
  • These: `Installed platforms: android 8.1.0 ios 4.2.0 windows 4.4.2 Available platforms: browser ^6.0.0 electron ^1.0.0 osx ^5.0.0` – MDompekidis Jun 18 '20 at 12:15
  • 1
    Update your iOS `4.2.0` to `5.1.0` or later. here is the list of Version https://github.com/apache/cordova-ios/releases. I would recommend you to use most Latest version i.e 6. – Najam Us Saqib Jun 18 '20 at 12:25
  • This ^^ is what fixed my issue. Also keep an eye for duplicate plugins like clipboard or console. – MDompekidis Jun 18 '20 at 13:28
  • @MDompekidis, Could you also post the set of steps you have done to fix the issue? A lot of people are facing this issue and your steps might help others. – Harish Jun 18 '20 at 13:32

1 Answers1

3

I have fixed my app for the exact issue recently and Here are the steps I have followed to fix the issue:

1) Ensure your cordova-plugin-ionic-webview is updated to the latest version 5.0.0. You need to run these two commands to do that.

ionic cordova plugin remove cordova-plugin-ionic-webview
ionic cordova plugin add cordova-plugin-ionic-webview@latest

2) Ensure your cordova-ios is updated to the latest version 6.0.0. Run this command to update it.

npm install cordova-ios@latest --save

3) Check your package.json to see if the versions are updated for both cordova-ios and cordova-plugin-ionic-webview.

4) Ensure you add WKWebViewOnly preference to config.xml file.

<platform name="ios">
    <preference name="WKWebViewOnly" value="true" />
    ...
</platform>

5) This is the most important step. Ensure you remove the ios platform and add it again. Run these commands to remove and add the ios platform.

ionic cordova platform rm ios
ionic cordova platform add ios

Now, when you build the ios app and publish it to the app store, you can see the issue will be fixed.

Harish
  • 714
  • 5
  • 11