Skip to content

Maui iOS WebView - MauiWKWebView DidFinishNavigation not called. #20713

@RobFrancisAu

Description

@RobFrancisAu

Description

Hey all,

It appears that DidFinishNavigation is not being called in MauiWKWebView.

[Export("webView:didFinishNavigation:")]

From what I can gather the NavigationDelegate is set in the constructor of MauiWKWebView as a MauiWebViewNavigationDelegate.

NavigationDelegate = new MauiWebViewNavigationDelegate(handler);

This MauiWebViewNavigationDelegate is what actually contains the implementation for DidFinishNavigation

[Export("webView:didFinishNavigation:")]

As a result of this, when navigating in a webview on iOS the line await handler.ProcessNavigatedAsync(url); in the MauiWKWebView

await handler.ProcessNavigatedAsync(url);

is not called. This is responsible for syncing cookies.

await SyncPlatformCookiesToVirtualViewAsync(url);
.

Steps to Reproduce

  1. Put a breakpoint on
    var url = CurrentUrl;
  2. Put a breakpoint on

When navigating inside a webview on iOS I was unable to hit breakpoint 1. Breakpoint 2 hit each time.

Link to public reproduction project repository

No response

Version with bug

8.0.6 SR1

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS

Did you find any workaround?

No response

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions