Recently, Apple introduced a new App Submission warning stating that they are formally deprecating UIWebView. We wanted to let the Ionic community know what this warning is all about and how the Ionic team plans to address it.
Update 09/18/2020: Added known plugins still using UIWebView and suggestion migration steps.
Update 01/15/2020: On December 23rd, 2019, Apple clarified plans for UIWebView: “The App Store will no longer accept new apps using UIWebView as of April 2020 and app updates using UIWebView as of December 2020.” Please follow the instructions below to either update to a newer version of Cordova or migrate to Capacitor.
Update 11/25/2019: The Cordova team has released Cordova iOS 5.1.0, which disables UIWebview at compile time. To use it, ensure you have a WKWebView plugin installed, then add
<preference name="WKWebViewOnly" value="true" />to your
config.xmlfile. Complete details below.
The bottom line: It’s time to update your apps! Apple will only accept submissions of Ionic-based iOS apps that contain references to UIWebView until April 2020 (new apps) and December 2020 (existing apps). To meet the new requirement, simply update to the latest version of Capacitor. If you’re using Cordova, see below.
What is this about?
A WebView is an embeddable web browser that native applications can use to display web content. Used by native runtimes like Cordova and Capacitor, they are part of the secret sauce that Ionic developers use to package web-based apps into native mobile apps that can access native hardware features like the camera or Bluetooth.
Apple previously announced UIWebView’s deprecation in June 2018. Beginning with iOS 12, they began warning developers about migrating to WKWebView, UIWebView’s successor.
This recent notification has brought it to the forefront. For reference, here’s the message you’ll see if you upload an app binary to the App Store:
We identified one or more issues with a recent delivery for your app, [App Name & version number]. Your delivery was successful, but you may wish to correct the following issues in your next delivery:
ITMS-90809: Deprecated API Usage – Apple will stop accepting submissions of apps that use UIWebView APIs. See https://developer.apple.com/documentation/uikit/uiwebview for more information.
After you’ve corrected the issues, you can use Xcode or Application Loader to upload a new binary to App Store Connect.
What’s the issue?
When you build an Ionic app, you can choose between Cordova or Capacitor to deploy a native mobile version. While more recent versions use
WKWebView automatically, Cordova still uses UIWebView APIs outright or contain references to them (Capacitor has been updated to remove these references – see below).
Upon app submission, Apple searches the app’s code for the “UIWebView” string then generates a submission warning if found. Therefore, a future release of
cordova-ios (the Cordova iOS library) will be required to ensure that all references to UIWebView APIs removed.
What versions of Ionic Framework are affected?
This deprecation warning relates to the native runtime in use (Cordova or Capacitor), not the version of Ionic. If you’re using Cordova with any version of Ionic Framework, follow the update steps below.
Will this prevent me from releasing an Ionic-based iOS app?
Yes, unless you update your app by these deadlines:
* April 2020: New apps
* December 2020: Existing apps
Currently, no, since this is just a warning, not an error. Warnings will not result in App Store rejections. UIWebView APIs are still supported in the upcoming iOS 13 release as well as macOS Catalina but are still going away in future releases. Sometime in the future, iOS apps may be blocked from release to the App Store when Apple decides to enforce blocking apps that use UIWebView.
What is Ionic doing about it?
On December 23rd, 2019, Apple released a news article detailing their plans.
We have asked Apple for the official date that they will stop accepting app submissions that include UIWebView APIs, but have not heard back yet. We will update this blog when we know more information.
- Ensure you have a WKWebView plugin installed: either the official Apache one or Ionic’s. All Ionic starter apps automatically include
<preference name="WKWebViewOnly" value="true" />to your
- Update each Cordova plugin to the latest version (these can trigger the warning too). Better yet – remove them if they are no longer needed!
cordova prepare iosto apply the changes.
- 5.1.0 has a conditional compile-time flag that disables UIWebView. This is an initial fix to prevent the Apple warning from being triggered.
- 6.0.0 will remove the entirety of UIWebView. This is a breaking change with more changes needed, so it’ll be released sometime in the coming months. As of January 2020, no ETA for release is known but version 5.1.0 will work just fine.
Using the popular InAppBrowser plugin? The Cordova team released an update in January 2020. Be sure to update this plugin to version 3.2.0 and above.
Known Plugin Issues
Trying to determine why you’re getting an Apple rejection? The following is a list of plugins still using UIWebView APIs along with migration suggestions. Note that functionality may not match one-to-one.
|cordova-plugin-firebase||Migrate to Capacitor and adopt one or more Capacitor Community Firebase plugins.|
|com.paypal.cordova.mobilesdk||No longer maintained. Try this web-based suggestion from the community: ngx-paypal|
|cordova-plugin-braintree||No longer maintained. Try this new plugin (in development): cordova-plugin-braintree-sdk|
|cordova-plugin-x-socialsharing||Update to latest version or switch to Capacitor Share API|
|cordova-plugin-facebook4||No longer maintained. Migrate to Capacitor and use the facebook-login Capacitor Community plugin.|
|cordova-plugin-inappbrowser||Update to version 3.2.0 and above. Also consider the Capacitor Browser plugin.|
|cordova-plugin-admob-free||Apply updates to the plugin detailed here.|
|cordova-plugin-printer||Update to the latest version.|
|com.telerik.plugins.nativepagetransitions||Consider migrating to Ionic Framework UI components, which include native UI transitions, animations, and gestures out-of-the-box.|
With this deprecation notice, now is the perfect time to consider migrating to Capacitor, Ionic’s spiritual successor to Cordova that enables modern web apps to run on all major platforms with ease.
On September 4th, 2019, the Ionic team shipped a new Capacitor release (here’s the v1.2.0 changelog) that removed references to UIWebView. To update your app, simply run the following commands to update the Capacitor iOS library:
npm update @capacitor/cli npm update @capacitor/core npm update @capacitor/ios npx cap sync
You may notice “UIWebView” references within your Capacitor-based iOS project. Files within the “CapacitorCordova” pod, for example, relate to Cordova compatibility. These will not trigger the warning.
Please note that if you’re using Cordova plugins in your Capacitor project, you’ll need to ensure those are updated before Apple’s deadline. If they can’t be updated, they’ll have to be removed from your project.
Customers using Ionic Native Enterprise Edition plugins, including the popular InAppBrowser plugin can update now as well. If your team relies on a particular native plugin, please reach out to us for assistance. If you’re on an Ionic Native Enterprise plan, please contact Ionic Support if you have any questions.