How to completely remove UIWebView from your Xcode Project

Thân Đặng
2 min readSep 11, 2020
UIWebView is now deprecated

As we all already know that UIWebView will be soon deprecated. For the new app, it won’t allow us to upload new binary with included UIWebView and For the apps are already existed on AppStore, you will receive a warning on every upload through email. So, either we switch to WKWebView or our app will be no updated.

As a developer, we usually come to steps:

  1. Open Xcode and search for whole workspace with keyword: *UIWebView*. Here is good tip to replace by WKWebView: UIWebView by WKWebView
  2. Update all libraries and dependencies to latest version. There are two types of libraries/dependencies: Open Sources (like CocoaPods) or static libraries. If those are recently updated (from contributors) and you’re safe. Otherwise, you have to manually adjust or fork to your own one and making adjust in order to adapt the changes.

You usually see the UIWebView even in your implementation as well as Pods project during step 1. However, sometimes the result is empty and when upload new binary, you still receive a warning from Apple or reject due to UIWebView still there, how crazy it is?

No result for UIWebView

It doesn’t list down because the dependencies is static ones and embed inside the libraries and we could not find by text from Xcode. Here is a good tip:

grep -r UIWebView <folder or project you would like to find>

And I do for my Pods project:

grep -r UIWebView Pods/

And luckily I found the result. Well done.

Optimizely-iOS-SDK contains UIWebView

And what left I need to do is just upgrade Optimizely-iOS-SDK.

There might be other SDK or dependencies due to your project settings or base on your destination folder you rep. Good luck!

Cheers!

--

--