UIWebViewClass was deprecated and we need to replace it with WKWebView or SFSafariViewController. Which class we should use?
I think we use WKWebView normally, but SFSafariViewController has enough functionality in some case.
It is decided which class can be used by requirements.
- You want to do something just before or after loading pages.
- You want to know the URL of loading pages.
If you want to do above, you need to use WKWebView. SFSafariViewController can not do above.
Requirements are really needed?
“We want to do something just after loading pages.”. It is often available requirement but it is really needed?
If you want to know the URL of loaded pages to check the authorization status, you can set the redirect URL to the application custom URL scheme and UIApplicationDelegate can handle it. It is able to do with SFSafariViewController.
Launching the browser is really good?
It is bad UX that launching Safari with sign-up page to create the account. After the account was created, user sign in in the app. User go and come between your app and Safari. It can’t be say good UX.
It is better opening the sign-up page with SFSafariViewController than launching Safari, I think.