Mars Mars - 1 year ago 281
Swift Question

Example of implementing 'WKNavigationDelegate' method 'didReceiveServerRedirectForProvisionalNavigation' method to follow redirects

I need a simple example in Swift to illustrate how I would implement the

WKNavigationDelegate
method
didReceiveServerRedirectForProvisionalNavigation
method to follow redirects.

Answer Source

Nothing needs to be done in this method to follow a redirect response. WKWebView will follow a redirect response without any further implementation necessary in the WKNavigationDelegate method didReceiveServerRedirectForProvisionalNavigation.