Search code examples
swiftios9

Swift - Get response from web (webview, safari, etc)


I want to open a url inside my app and make login. After that, it'll redirect somewhere and it'll give me a response (200, or 500). I'd like to get that response.

Is it possible? I've seen that there are several options: webview, safariviewcontroller using SafariServices or even SFAuthenticationSession (but it's deprecated and the new one is iOS 12...)

What do you recommend?

Kindest regards!!


Solution

  • you can use WKWebView with its delegate functions to archive this type of behavior.