If your app still embeds web content using the deprecated UIWebView API, we strongly encourage you to update to WKWebView as soon as possible for improved security and reliability. WKWeb service ensures that compromised web content doesn’t affect the rest of an app by limiting web processing to the app’s web view. And it’s supported in iOS and macOS, and by Mac Catalyst. The App Store will no longer accept new apps using UIWeb services as of April 2021 and app updates using UIWebView as of December 2021.
In this article I want to share the problem in deploying the application on Appstore – TestFlight, got this email from support when I upload.
UIWebView Issues Resolved
We identified one or more issues with a recent delivery for your app. Please correct the following issues, then upload again. ITEMS-90809: Deprecated API Usage – New apps that use UIWeb applications are no longer accepted. Instead, use the WKWeb application for improved security and reliability.
Learn more about the issue is defined in the AppStore Review Guidelines.
API Application Used With WebView Interface
In my case, I am not using web services in the project, Now need to check the web application in the project. Go to your project directory and run grep -r UIWebView. command. You will get all the UIWebView application references in your project including third-party PODs/SDK/Libraries. Replace this API service with WKWebView in your code and if any of your third-party libraries internally using the web application, ask their support team to provide an update with WKWebView and replace it in your code with an updated third-party library.
Usage of old Versions of Pod, Libraries, etc. I saw Firebase using APIWebView for Authentication using Phone Numbers, then I checked the pod file of my project it’s using an older version of Firebase Core which uses web view services for Phone Number Authentication.
In terminal type: pod disintegrates. Update pod in podfile from FirebaseCore In terminal type: pod installs now Firebase Core version is 8 or above. after installing pods clean the product and check again with the terminal by grep -r UIWebView. The command didn’t show the review service. It uploaded successfully and get the Test Flight link for the beta version of the application Using the WkWeb application in Project.
Read more: 10 Reasons You Need API Integration Platform
If you want to use WkWebServices just import WebKit then make the object of WkWebViews and make a request like that.
let URL = NSURL (string: “Your URL”);
let requestObj = NSURLRequest(url: url! as URL);
wkWebView.load(requestObj as URLRequest);
This is the basic example of using APIWebView in Swift & IOS.