UIWebView

Hi!
How can I fix issue about UIWebView? I don't use the UIWebView in my code, I use WKWebView. However when I submit an APP for Review on TestFlight I get an email with the warning: ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs.
I don't use the FirebaseAuth and any other APPs to cause this error.
I've already updated pods to the latest versions several times.
Can someone help me solve it?
Thanks!

Replies

In all instances I’m aware of, apps that are getting the UIWebView usage warning are in fact linking to the UIWebView framework. It may be in third party libraries or frameworks. 

Please check again what your app and its libraries link against. You can do so by running the grep command in Terminal. For example,
  1. Open Terminal

  2. Type the following on the command line to change to the directory where your application binary is:

cd ~/Library/Developer/Xcode/Archives/<date of your archive>/<your archive>

3. To search for UIWebView use the following command:

grep -R UIWebView *

This should give you a list of files that contain a reference to UIWebView. From that list you should then be able to determine where the UIWebView reference is.

To make this a bit more concrete, the other day I created a test app named SingleViewApp and archived it, so this is what I did to check for the UIWebView:

% cd ~/Library/Developer/Xcode/Archives/
% ls
2019-08-26 2020-03-09
% cd 2020-03-09 
% ls
SingleViewApp 3-9-20, 11.38 AM.xcarchive SingleViewApp 3-9-20, 11.41 AM.xcarchive
SingleViewApp 3-9-20, 11.39 AM.xcarchive SingleViewApp 3-9-20, 11.47 AM.xcarchive

% cd "SingleViewApp 3-9-20, 11.47 AM.xcarchive"
% grep -R UIWebView *

Binary file Products/Applications/SingleViewApp.app/Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib matches
Binary file dSYMs/SingleViewApp.app.dSYM/Contents/Resources/DWARF/SingleViewApp matches

So we now know that there are references to UIWebView in the dSYM file and the nib.

Next we need to search the project for where the occurrences of the UIWebView exist.

Go to the folder where your project lives. In my case it was here:

cd ~/src/SingleViewApp

Now run the same grep command for UIWebView to determine if there are any occurrences in the project:

grep -R UIWebView *

In my case there weren't which means it’s not referenced in code.

Now run a search for UIWebView that will show up in storyboards by running this search:

grep -R webView *

In my case that returns the following results:

SingleViewApp/Base.lproj/Main.storyboard:                            <webView contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="xsA-nw-Njb">

SingleViewApp/Base.lproj/Main.storyboard:                            </webView>

This tells us that the Main storyboard has a UIWebView in it.

Copy the id of the storyboard object, in this case it’s: 

xsA-nw-Njb

And in Xcode perform a project-wide search for that value by going to Find > Find In Project… and searching for the storyboard ID.

In the returned results, click on the ID and it will take you to the specific scene in the storyboard that contains the UIWebView.

Hope this helps.