Im new to Cocoa.
I'm trying to extract the URL of the currently loaded webpage in my WebView object. I use this WebView to show a login screen and after logging in I have to get some parts of the URL.
I have already tried
[[[[frame provisionalDataSource] request] URL] absoluteString];
but this one only works one time, when called while loading. If the loading is complete it returns "(null)". The problem is, that it seems like the URL changes while loading the page so i get the wrong URL.
Does anybody know how to get the URL at any time I want?
Thanks
Switch provisionalDataSource
with dataSource
. Once the frame starts loading, it's not provisional anymore.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With