Apple will stop accept submission of apps that use UIWebView APIs starting from Dec 2020

Today, I submitted an Ionic 4 app to Apple.
It has been accepted, but I received this warning.
I’m wondering seriously how we will be able to build and submit Ionic apps to Apple from December 2020…

ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs starting from December 2020 . See https://developer.apple.com/documentation/uikit/uiwebview for more information.

Did you read this? https://ionicframework.com/blog/understanding-itms-90809-uiwebview-api-deprecation/ (First Google Solution by the way :wink:)
I think it explains the situation very well

1 Like

Hi,

As mentioned here https://ionicframework.com/blog/understanding-itms-90809-uiwebview-api-deprecation, I have updated cordova-ios to 5.1.1 latest version and updated all my Cordova plugins. Still, I got the same warning message from the Apple side. Do you have any idea or I have missed anything to update or which plugin throws that deprecation message?

updated plugins list

call-number 0.0.2 “Cordova Call Number Plugin”
cordova-android-play-services-gradle-release 4.0.0 “cordova-android-play-services-gradle-release”
cordova-plugin-app-version 0.1.9 “AppVersion”
cordova-plugin-background-mode 0.7.3 “BackgroundMode”
cordova-plugin-badge 0.8.8 “Badge”
cordova-plugin-camera 4.1.0 “Camera”
cordova-plugin-device 2.0.3 “Device”
cordova-plugin-email-composer 0.9.2 “EmailComposer”
cordova-plugin-file 6.0.2 “File”
cordova-plugin-file-opener2 2.2.1 “File Opener2”
cordova-plugin-file-transfer 1.7.1 “File Transfer”
cordova-plugin-firebase 2.0.5 “Google Firebase Plugin”
cordova-plugin-globalization 1.11.0 “Globalization”
cordova-plugin-inappbrowser 3.2.0 “InAppBrowser”
cordova-plugin-ionic 5.4.6 “cordova-plugin-ionic”
cordova-plugin-ionic-keyboard 2.1.3 “cordova-plugin-ionic-keyboard”
cordova-plugin-ionic-webview 4.1.3 “cordova-plugin-ionic-webview”
cordova-plugin-local-notification 0.9.0-beta.2 “LocalNotification”
cordova-plugin-mauron85-background-geolocation 3.0.3 “CDVBackgroundGeolocation”
cordova-plugin-network-information 2.0.2 “Network Information”
cordova-plugin-safariviewcontroller 1.6.0 “SafariViewController”
cordova-plugin-splashscreen 5.0.3 “Splashscreen”
cordova-plugin-statusbar 2.4.3 “StatusBar”
cordova-plugin-touch-id 3.3.1 “Touch ID”
cordova-plugin-whitelist 1.3.4 “Whitelist”
cordova-sqlite-storage 3.4.1 “Cordova sqlite storage plugin - cordova-sqlite-storage plugin version”

config.xml

    <access origin="http://localhost:8080/*" />
    <allow-navigation href="http://localhost:8080/*" />
    <feature name="CDVWKWebViewEngine">
        <param name="ios-package" value="CDVWKWebViewEngine" />
    </feature>
    <preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
    <preference name="WKWebViewOnly" value="true" />

Ionic Info:

Ionic:

Ionic CLI : 6.3.0 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 4.11.4
@angular-devkit/build-angular : 0.803.21
@angular-devkit/schematics : 8.3.0
@angular/cli : 8.3.0
@ionic/angular-toolkit : 2.0.0

Cordova:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.1.0, ios 5.1.0
Cordova Plugins : cordova-plugin-ionic 5.4.6, cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.3, (and 20 other plugins)

Utility:

cordova-res (update available: 0.11.0) : 0.6.0
native-run (update available: 0.3.0) : 0.2.8

System:

Android SDK Tools : 26.1.1 (/Users/sys-user/Library/Android/sdk)
ios-deploy : 1.9.4
ios-sim : 8.0.2
NodeJS : v10.16.1 (/usr/local/bin/node)
npm : 6.9.0
OS : macOS Catalina
Xcode : Xcode 11.2.1 Build version 11B500

So then a Plugin must cause the Issue. I don’t know which one. Try open your Project in xCode and search for UiWebView Code References.

Yes, but it shows more than 135 references of UIWebview in Xcode. Even the application has default plugins.

So let me explain. Apple will check if the UiWebView is used.

So if it occurs in Comments: No Problem.
Also Cordova did not complete remove the UiWebView in 5.1.1 (will in 6.0.0), but they added a compile time decision to disable the UiWEbView. This is handled via the WK_WEB_VIEW_ONLY Tag in xCode, which is set to 1 ( = true) if you set <preference name="WKWebViewOnly" value="true" /> like you did.

So you sadly have to go through all the 135 References and check if there are some, that are not in Comments and not wrapped by the WK_WEB_VIEW_ONLY Tag.

Just additional information. You can have the reference to UIWebView inside of a binary file. So, you can run the following command on your project to found it and after that remove the plugin or update it.

grep -r "UIWebView" platform/ios

Source: https://cordova.apache.org/howto/2020/03/18/wkwebviewonly.html#comment-4855730838

I execute that command and found that ‘cordova-admob-sdk/GoogleMobileAds.framework/GoogleMobileAds matches’, please let me know what should i do now?
cordova-ios version is 6.0.0 and other plugins I am mentioning below
cordova-admob-sdk 0.24.1 “AdMob SDK”
cordova-plugin-admob-free 0.27.0 “Cordova AdMob Plugin”
cordova-plugin-appavailability 0.4.2 “AppAvailability”
cordova-plugin-apprate 1.5.0 “AppRate”
cordova-plugin-device 2.0.2 “Device”
cordova-plugin-dialogs 2.0.2 “Notification”
cordova-plugin-geolocation 4.0.2 “Geolocation”
cordova-plugin-inappbrowser 4.0.0 “InAppBrowser”
cordova-plugin-ionic-keyboard 2.2.0 “cordova-plugin-ionic-keyboard”
cordova-plugin-ionic-webview 5.0.0 “cordova-plugin-ionic-webview”
cordova-plugin-market 1.2.0 “Market”
cordova-plugin-nativestorage 2.3.2 “NativeStorage”
cordova-plugin-network-information 2.0.2 “Network Information”
cordova-plugin-splashscreen 5.0.2 “Splashscreen”
cordova-plugin-statusbar 2.4.2 “StatusBar”
cordova-plugin-whitelist 1.3.3 “Whitelist”
cordova-plugin-x-socialsharing 5.6.8 “SocialSharing”
cordova-promise-polyfill 0.0.2 “cordova-promise-polyfill”
es6-promise-plugin 4.2.2 “Promise”