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:
cordova-plugin-ionic-webview
was in version >= 5.0.0<platform name="ios">
<preference name="WKWebViewOnly" value="true" />
...
</platform>
To config.xml
npm install -g ionic@latest
npm install -g cordova@latest
npm install @ionic/app-scripts@latest
ionic cordova platform rm ios
ionic cordova platform add ios
ionic cordova prepare ios
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.