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.xml file. 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.
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
Using Cordova?
On November 25th, 2019, the Cordova team released Cordova iOS 5.1.0, which disables UIWebview at compile time. They were previously discussing a plan to move forward.
To update:
Ensure you have a WKWebView plugin installed: either the official Apache one or Ionic’s. All Ionic starter apps automatically include cordova-plugin-ionic-webview.
Add <preference name="WKWebViewOnly" value="true" /> to your config.xml file.
Update each Cordova plugin to the latest version (these can trigger the warning too). Better yet – remove them if they are no longer needed!
Run cordova prepare ios to apply the changes.
To recap:
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.
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.xml file. 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.
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
Using Cordova?
On November 25th, 2019, the Cordova team released Cordova iOS 5.1.0, which disables UIWebview at compile time. They were previously discussing a plan to move forward.
To update:
Ensure you have a WKWebView plugin installed: either the official Apache one or Ionic’s. All Ionic starter apps automatically include cordova-plugin-ionic-webview.
Add <preference name="WKWebViewOnly" value="true" /> to your config.xml file.
Update each Cordova plugin to the latest version (these can trigger the warning too). Better yet – remove them if they are no longer needed!
Run cordova prepare ios to apply the changes.
To recap:
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.
Comments
Post a Comment