How to Find UIWebView Uses in Your iOS App

Adam Wareing
Level Up Coding
Published in
2 min readApr 3, 2020

--

You may have seen this warning on a recent submission of your app to iTunes Connect and have wondered what it meant.

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.

What it’s saying is that your app contains a reference to a UIWebView API which is now deprecated in iOS 12.0. Apple is warning you that in the future your app won’t be approved until the reference has been removed. I was confused at first because the app I was submitting didn’t use any UIWebView’s. Although, it turns out the dependencies did.

If you are using aUIWebView you should migrate it to use a WKWebView. Otherwise, if a dependency does, you should upgrade it to a newer version where the developer has removed that reference.

Finding references to UIWebView

To find uses in your app- in your root directory, you can run the following terminal command which will highlight the path to files that contain the term. Not all results will imply that it contains it though. For example, a well know dependency, PromiseKit references it in a comment but doesn’t actually use the API, so make sure you look into the line of code it’s used on first.

grep -r UIWebView .

What about binary frameworks?

Binary frameworks don’t reveal their plain text source code, so a grep won’t work on them directly. Instead, once you have done an archive of your app you should right-click on it to reveal it in finder. Then right-click on the archive to show package contents. From here you want to navigate to:

/Products/Applications/MyAppName.app

From there by running the following shell script to look at the frameworks symbols for UIWebView mentions.

for framework in Frameworks/*.framework; do
fname=$(basename $framework .framework)
echo $fname
nm $framework/$fname | grep UIWebView
done

There you have it

From fixing several projects, I have found that the likely culprits are social login e.g. GoogleSignIn and FBSDKLoginKit along with common dependencies such as Crashlytics

Hopefully, this has helped you remove references to UIWebView.

--

--