I'm using a SFSafariViewController. The initial url that loads redirects to another url. I need to get the current url bar that SFSafariViewController has.
It's successfully redirecting because I can see it in the url bar but I got no access not even from delegate methods.
Before that, I was using UIWebView and it worked fine but suddenly it doesn't redirect anymore.
This is my code for SFSafariViewController:
override func viewDidAppear(_ animated: Bool) {
safari = SFSafariViewController(url: URL(string:"https://api.instagram.com/oauth/authorize/?client_id=client_code&redirect_uri=http://localhost&response_type=code")!)
safari.delegate = self
self.present(safari, animated: true, completion: nil)
}
It's presenting rightly but I need access to the current url.
Thanks in advance.