33
votes

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?

10
@TylerTheCompiler No. It seems but its not...please read it first...I am aware of the fact that UIWebView is getting depricated but for new app. for old apps they mentioned dec 2020 deadline. and still I am not abel to update my existing appRagesh Pikalmunde
Have you ever released a build of this app with this bundle id to the App Store?Paulw11
Yes..i did...I have my app live on app store at this time...and I want to update itRagesh Pikalmunde
I had the same problem for my existing app (2+ years on App Store). I did have one component that was still using UIWebView and had to migrate that to WKWebView. Strange since existing apps should still not be rejected until Dec 2020. I also just started happening randomly in the beginning of May. Did work for a couple of days in May so it's trange that the April 30 deadline didn't cause this issue.Crt Gregoric

10 Answers

30
votes

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

22
votes

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.

10
votes

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.

2
votes

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

2
votes

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/

2
votes

In my case, There was no UIWebView in my project but still apple shows the above error. Then I find out the files which contain UIWebView using the following steps.

Step 1.Open terminal Step 2. cd then hit enter. Step 3. paste this command grep -r "UIWebView" . Then you will find the file list.

In my case. I remove GoogleAdMobSDK from project and install it again using pod. https://developers.google.com/admob/ios/quick-start

If you never used pod then learn "How to use pod" on youtube.

After installing pod. Apple accepted my project.

Huh. Finally solved.

1
votes

I have faced same problem in Ionic 4.

List of steps followed to fix the problem

please update your IOS platform. and App browser .

cordova plugin add cordova-plugin-wkwebview-engine

run cordova plugin add cordova-plugin-wkwebview-engine

detele node_modules , then reinstall by run yarn or npm install

run ionic cordova platform rm ios

run ionic cordova platform add [email protected]

npm i [email protected]

cordova plugin add [email protected]

ionic cordova prepare ios.

ionic cordova build ios
1
votes

The answer here solved my problem

cordova prepare ios
npm install -g cordova-check-plugins
npm install -g npm
cordova-check-plugins --update=auto
npm update -g cordova
ionic cordova platform rm android
ionic cordova platform rm ios
npm i -g @ionic/cli
cordova plugin remove cordova-plugin-inappbrowser
cordova plugin add [email protected]
ionic cordova platform remove ios && ionic cordova platform add ios@latest && ionic cordova build ios
0
votes

I get rid out from this by following below steps (in react-native project)-

Step 1:

Search “UIWebView” in xcode project directory

Step 2:

Right click (on RCTWebView.m) and select “Reveal In Project Navigator”

Step 3:

Scroll down and delete the following four files only:

 1. RCTWebView.h
 2. RCTWebView.m
 3. RCTWebViewManager.h
 4. RCTWebViewManager.m

Then clean the project & archive.

N.B: If you use 'react-native-community/react-native-webview' library then update with latest version otherwise it's done.

0
votes

update your package (like for example react-native-device-info).

Its working

 in package.json update device-info to latest
"react-native-device-info": "^8.0.8",

run this command in terminal

grep -r UIWebView node_modules/*



ignored for contexts returned by UIWebView. */
node_modules/react-addons-shallow-compare/node_modules/fbjs/lib/UserAgent.js.flow:   * - UIWebView
node_modules/react-addons-shallow-compare/node_modules/fbjs/lib/UserAgent.js:   * - UIWebView
node_modules/recyclerlistview/node_modules/fbjs/lib/UserAgent.js.flow:   * - UIWebView
node_modules/recyclerlistview/node_modules/fbjs/lib/UserAgent.js:   * - UIWebView
node_modules/ua-parser-js/test/browser-test.json:        "ua"      : "Mozilla/5.0 (iPhone; CPU iPhone OS 10_0_2 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) Mobile/14A456 QQ/6.5.3.410 V1_IPH_SQ_6.5.3_1_APP_A Pixel/1080 Core/UIWebView NetType/WIFI Mem/26",
DT-67iMac-2:IGPSYARD stigasoft$ 


yarn upgrade react-addons-shallow-compare recyclerlistview ua-parser-jss

cd ios

  rm -rf Pods # probably not needed.  (delete pods and podfile.lock file and again pod install)

pod install

more details

Built my project, tested everything was still working and submitted to Apple. This time there was no message about using a depreciated API.