1

I'm using the Ionic Framework to build iOS apps. When I'm uploading a build to AppStoreConnect (to test it via TestFlight for example), I'm getting the well known deprecation message:

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

However I have followed all the instructions (e.g. from the official Ionic Blog) and don't know what I could have missed.

What I did:

  1. Updated all cordova plugins to the latest version (e.g. cordova-plugin-ionic-webview is now on v4.1.3; cordova-plugin-inappbrowser is on v3.2.0)
  2. Checked Cordova Platform (it is ios 5.1.1)
  3. Made sure that I have <preference name="WKWebViewOnly" value="true"/> in my config.xml
  4. Ran ionic cordova prepare ios and ionic cordova build ios

I still get the deprecation message, I already tried removing the whole ios platform and adding it again afterwards, that didn't help.

List of cordova plugins I'm using:

card.io.cordova.mobilesdk 2.1.0 "CardIO"
com-badrit-base64 0.2.0 "Base64"
com.paypal.cordova.mobilesdk 3.5.0 "PayPalMobile"
cordova-plugin-add-swift-support 2.0.2 "AddSwiftSupport"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-camera-with-exif 1.3.1 "cordova-plugin-camera-with-exif"
cordova-plugin-device 2.0.2 "Device"
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-filepath 1.5.6 "cordova-plugin-filepath"
cordova-plugin-ftp 1.1.1 "Ftp"
cordova-plugin-google-analytics 1.8.6 "Google Universal Analytics Plugin"
cordova-plugin-inappbrowser 3.2.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.1.3 "cordova-plugin-ionic-webview"
cordova-plugin-nativegeocoder 3.2.2 "NativeGeocoder"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-taptic-engine 2.1.0 "Taptic Engine"
cordova-plugin-vibration 3.1.1 "Vibration"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-sqlite-storage 3.4.0 "Cordova sqlite storage plugin - cordova-sqlite-storage plugin version"
cordova.plugins.diagnostic 5.0.1 "Diagnostic"

Ionic Info:

Ionic:

   Ionic CLI                     : 5.4.16 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.11.10
   @angular-devkit/build-angular : 0.803.21
   @angular-devkit/schematics    : 8.1.3
   @angular/cli                  : 8.1.3
   @ionic/angular-toolkit        : 2.0.0

Cordova:

   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.1.3, (and 17 other plugins)

Utility:

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

System:

   ios-deploy : 1.9.4
   ios-sim    : 8.0.2
   NodeJS     : v10.16.3 (/usr/local/bin/node)
   npm        : 6.14.4
   OS         : macOS Mojave
   Xcode      : Xcode 11.2.1 Build version 11B500

Does anybody have an idea what could cause the issue?
I'm about to release an app in the next couple of days/weeks.

Thank you so much in advance!

Kheber
  • 317
  • 1
  • 3
  • 13
  • I'm in the same boat, just learning about this mess. If you do a search in your Xcode project for UIWebview, that will ideally give you some hints. I believe you can ignore instances in the `CordovaLib.xcodeproj`, since ideally those are handled by your `cordova-ios 5.1.1` upgrade. In my case, I have other references from the codepush plugin...which may or may not be fixed. Hopefully this would point you to other plugins of yours that are causing the rejection? – BRass Mar 26 '20 at 21:57
  • How do I know that it's coming from a plugin? I've checked my Xcode project for UIWebview and found some references. Most of them are in `CordovaLib.xcodeproj` but you mentioned that this is handeld by cordova-ios. Other references are: `swiper-bundle-ccaac54-js.js`, `MainViewController.m` and `CDVWKWebViewEngine.m`. – Kheber Mar 27 '20 at 10:08
  • If you select the file in question, you should be able to see it in the `Plugins` directory to confirm it's a plugin...and the folder it is in under `/Plugins` should tell you which plugin. That's a first step - you'd still likely need to look at how it's referencing UIWebview. Sometimes it may just be a comment, for example. That would just give you a hint on which plugins to investigate that may be causing this - and go to their github repos to see if others are complaining, or if there is a more current version. – BRass Mar 27 '20 at 13:07
  • Thanks again. I identified the problem is coming from the PayPal integration (com.paypal.cordova.mobilesdk). I removed this cordova plugin and now Apple accepts the app. Although I need PayPal in my app, otherwise it's not usable. I have tried to find a reference to `UIWebView` in Xcode under `myappname/Plugins/`, although I couldn't find any occurrence. That's really strange because it means that the PayPal plugin isn't using `UIWebView`? – Kheber Mar 27 '20 at 13:40
  • I'm not sure - I have never used that plugin. Sounds like it's either that, or a chance that you made other adjustments in your last submission too, or Apple isn't being consistent in their review processes. Tough to say. – BRass Mar 27 '20 at 18:01

1 Answers1

2

You should have a reference to UIWebView in a binary file, you can run the following command on your project to found it and remove the plugin or update it.

grep -r "UIWebView" platform/ios

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