Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ITMS-90809: Deprecated API Usage - existing app that use UIWebView are no longer accepted

ITMS-90809: Deprecated API Usage - Apple will no longer accept submissions of new apps that use UIWebView as of April 30, 2020 and app updates that use UIWebView as of December 2020. Instead, use WKWebView for improved security and reliability.

I am trying to update an existing app, not a new app. Still I am not able to upload the app. I got this error via email:


We identified one or more issues with a recent delivery for your app, "App Name" 20202.421.1 (6). Please correct the following issues, then upload again.
ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability. Learn more (https://developer.apple.com/documentation/uikit/uiwebview).

Did Apple change its policy or something? Or do I need to change UIWebView?

like image 445
Ragesh Pikalmunde Avatar asked May 14 '20 06:05

Ragesh Pikalmunde


People also ask

Is UIWebView deprecated?

Apple is phasing out UIWebView, which is used by developers for integrating web content into an app in a quick and secure manner. Apple is replacing UIWebView (and WebView) with WKWebView, an updated version, as UIWebView has been deprecated.

Can I still use UIWebView?

UIWebView APIs are still supported in the upcoming iOS 13 release as well as macOS Catalina but are still going away in future releases.

How do I fix UIWebView deprecated ionic 4?

cordova platform remove ios cordova platform add [email protected] Add <preference name = "WKWebViewOnly" value = "true" /> to your config. xml file Run "cordova prepare ios" to apply the changes. Show activity on this post. Use cordova-ios version 5.1.

When was UIWebView deprecated?

And last year, we announced that the App Store will no longer accept app updates containing UIWebView as of December 2020.


5 Answers

Yes, Apple did change the policies Are you using ionic? if so, install these:

  1. cordova plugin add cordova-plugin-ionic-webview@latest
  2. npm install @ionic-native/ionic-webview

Then add this to your config.xml under ios platform:

<preference name="WKWebViewOnly" value="true" />
<feature name="CDVWKWebViewEngine">`
<param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />

Finally run ionic cordova prepare ios to reflect the changes then run ionic cordova build ios --prod

PS: Make sure you have only one webview plugin installed.. either this or the 'cordova-webviewengine'. But the above method worked for me and my app is in app store now

like image 182
Sireesha Avatar answered Oct 26 '22 06:10

Sireesha


In Terminal, run this command in your iOS project folder:

grep -r "UIWebView" .

It will show all the files that uses UIWebview. Update whatever files to use WKWebView. If your pod libraries are showing that it has UIWebView. Update the pods files as well.

FYI it took me 6 hours to fix my project to use WKWebView since I had to update the pods files and had to fix a lot of code.

like image 44
user1733372 Avatar answered Oct 26 '22 06:10

user1733372


i faced the same issue few days earlier for my IONIC 4 Project. when i uploaded my IPA, i got this warnings from App Store Connect.

enter image description here

I fixed the "UIWebView" issue, by the following steps. hope it will also work for you.

Follow this steps :

  1. Run the following command to Remove the existing platform.

    ionic cordova platform rm ios

  2. remove the existing web view plugin and install the latest one.

    ionic cordova plugin rm cordova-plugin-ionic-webview

    ionic cordova plugin add cordova-plugin-ionic-webview@latest

  3. Install this also.

    npm install @ionic-native/ionic-webview@latest

  4. Add this to your config.xml file under the ios part.

    <preference name="WKWebViewOnly" value="true" /> <feature name="CDVWKWebViewEngine"> <param name="ios-package" value="CDVWKWebViewEngine" /> </feature> <preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />

  5. check your "cordova-ios": "^5.1.1" version. it should be 5.1.x or greater.

  6. then run this commands to build again.

    ionic cordova platform add ios

    ionic cordova prepare ios

    ionic cordova build ios

that's all. it worked for me.


My Package.json file :

enter image description here

enter image description here

Sharing my config.xml also :

enter image description here

Follow this link for more info :

https://ionicframework.com/blog/understanding-itms-90809-uiwebview-api-deprecation/

Thanks.

like image 12
Sushil Avatar answered Oct 26 '22 05:10

Sushil


facebook4, googleplus, fcm older version of these cordova plugins also using UIWebView. need to use latest versions

like image 3
shanthan Avatar answered Oct 26 '22 07:10

shanthan


For Xamarin Form projects, here is the fix:

Go to your iOS project, open the project properties and add this flag in the additional mtouch arguments field: --optimize=experimental-xforms-product-type this flag works together with the Linker Behavior set to SDK Only or All.

Read more from Microsoft: https://devblogs.microsoft.com/xamarin/uiwebview-deprecation-xamarin-forms/

like image 2
Olorunfemi Davis Avatar answered Oct 26 '22 06:10

Olorunfemi Davis