I already tried getting the current URL of my UIWebView with: webview.request.URL.
Unfortunately the NSURL was empty. Anything wrong h
This is not correct, and will return a nil:
NSString *currentURL = [webView stringByEvaluatingJavaScriptFromString:@"window.location"];
However, the code below can get a URL, but the url may not be the current URL:
NSString *url = _webView.request.URL.absoluteString;
The correct one is:
NSString *currentURL = [_webView stringByEvaluatingJavaScriptFromString:@"window.location.href"];