Skip to main content

Understanding ITMS-90809: UIWebView API Deprecation

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.

Comments

Popular posts from this blog

How to align Title at center of ActionBar in Android

How to Align Title At Center of Action Bar in Android                                                                                                                                                @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); setTitle("DashBoard"); }   Activity  public void setTitle ( String title ){ getSupportActionBar (). setHomeButtonEnabled ( true ); getSupportActionBar (). setDisplayHomeAsUpEnabled ( true ); TextView textView = new TextView ( this ); textView . setText ( title ); textView . setTextSize ( 20 ); textView . setTypeface ( null , Typeface . BOLD ); textView . setLayoutParams ( new LinearLayout . LayoutParams ( LinearLayout . LayoutParams . FILL_PARENT , LinearLayout . LayoutParams . WRAP_CONTENT )); textView . setGravity ( Gravity . CENTER ); textView . setTextColor ( getResources (). ge

Difference Between Pending Intent And Intent in Android

                       Normal Intent       Normal Intent will die as soon as the app being killed.    An Android Intent is an object carrying an intent, i.e a message from one Component to another     Component either inside or outside of the application.Intent can communicate message among     any of the three core Components of an application -- Activities, Services,and BroadcastReceivers.     Two types of Intent in Android   1. Explicit Intent.   2.Implicit Intent  Explicit Intent is an Intent which is used to Call the another component Explicitly in your application  Like :We are calling  Next activity on button click of First activity using Intent Example  // Explicit Intent by specifying its class name Intent i = new Intent ( this , TargetActivity . class ); i . putExtra ( "Key1" , "ABC" ); i . putExtra ( "Key2" , "123" ); // Starts TargetActivity startActivity ( i );  Implicit Intent Intent

Expected a key while parsing a block mapping (Flutter)

Flutter makes use of the Dart packaging system, pub. Via your applications  pubspec.yam l file (or simple pubspec), you can pull down packages from the flutter ecosystem, or the broader dart community. Anyway, i need to add some images to my flutter application, and so had to add an assets section to the pubspec .the default Android Studio generated apps pubspec has a lot of commented out code with explainations about what is going on, e.g # To add assets to your application, add an assets section, like this: # assets: # - images/a_dot_burr.jpeg # - images/a_dot_ham.jpeg # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.io/assets-and-images/#resolution-aware. So I uncommented these lines # assest : - - - #  -  images/a_dot_ham.jpeg with the idea from these comment.  that i would just edit it to suit my particular needs. Once you have edited your  pubspec, you need to click on the "Get dependencies"