Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6690355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:37:38+00:00 2026-05-26T05:37:38+00:00

I have added a WebView to a Cocoa application and I’m trying to figure

  • 0

I have added a WebView to a Cocoa application and I’m trying to figure out which delegate I can use to detect when navigation changes (user clicks a link, or javascript fires to change the location, etc).

The WebView class reference contains four delegates (WebFrameLoadDelegate Protocol Reference, WebPolicyDelegate Protocol Reference, WebResourceLoadDelegate Protocol Reference and WebUIDelegate Protocol Reference) and I have looked at each of these, but I cannot seem to find how to detect this. Am I missing something blatantly obvious or is there no way to get this?

tldr – Trying to figure out how I can set a delegate to get an event when the WebView is changing URL. (Specifically I need to know what the new URL is).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T05:37:39+00:00Added an answer on May 26, 2026 at 5:37 am

    Using WebKit (i.e. MacOS X) then probably the best place to track requests is in webView:identifierForInitialRequest:fromDataSource:, although webView:resource:willSendRequest:redirectResponse:fromDataSource: is also good, and has the advantage of allowing you to modify the request.

    As with iOS, you can use [request URL].

    Set this via [webView setResourceLoadDelegate:self];.

    The resource load delegate (as above) gives better options to handle the request, in my opinion, than the policy delegate methods.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple WebView application which takes some time to load up when
Cocoa app, SnowLeopard I have a WebView in to which I'm loading HTML (essentially
I have added a JavaScript Interface to WebView. I am able to use all
I have added some code which compiles cleanly and have just received this Windows
I have added a new job in my hudson server which builds the project
I have added some settings to my c# application using the configuration editor. There
I have added a navigation controller in iphone app from my home screen it
When is a page added to the forward backward list in WebView? I have
I have WebView which loads some page, when it's finished I apply some javascript
I have facing a big problem with my webView application for android. It was

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.