UIWebView was deprecated

There are 3 classes to embed the web browser into the iOS app.

  • UIWebView class
  • WKWebView class
  • SFSafariViewController class

UIWebView class was deprecated long time ago, now the AppStore doesn’t allow using UIWebView class.

Updating Apps that Use Web Views

According to this post, if you upload the apps that uses it, the App Store reject the new apps after April 2020, and updates for exiting apps after December 2020.

[Swift/ObjC] How to replace UIWebView with WKWebView

What should we do?

Basically, you need to migrate to the WKWebView class, but it is case by case.

If you use the embedded browser to show the support site or authorize with the OAuth2, you can use the SFSafariViewController class. It is able to do above functions. The SFSafariViewController class is a view controller which has same functionality as the Safari. It is a simple web browser.

If you want to authorize the OAuth2 with the SFSafariViewController, you can set the redirect URL to the application specific custom scheme URL and receive the result. The SFSafariViewController class can be hidden, you can show the progress indicator instead of the SFSafariViewController while waiting authorize result.

If you want to know which class  should be used the SFSafariViewController or the WKWebView, see the next post.

Which class we should use? WKWebView or SFSafariViewController

 

Sponsored Links
Get the Latest News !