Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make iOS WebView delegates virtual #27601

Draft
wants to merge 3 commits into
base: net10.0
Choose a base branch
from

Conversation

jfversluis
Copy link
Member

Description of Change

Makes the MauiWebViewNavigationDelegate methods virtual so people can override these.

Issues Fixed

Fixes #7551

@jfversluis jfversluis added this to the .NET 10.0-preview2 milestone Feb 6, 2025
@Copilot Copilot bot review requested due to automatic review settings February 6, 2025 09:07
@jfversluis jfversluis requested a review from a team as a code owner February 6, 2025 09:07
@jfversluis jfversluis requested review from StephaneDelcroix and mattleibow and removed request for a team February 6, 2025 09:07
Copy link
Contributor

🚨 API change(s) detected @davidbritch FYI

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt: Language not supported
@jfversluis jfversluis marked this pull request as draft February 6, 2025 09:31
@@ -23,7 +23,7 @@ public MauiWebViewNavigationDelegate(IWebViewHandler handler)
}

[Export("webView:didFinishNavigation:")]
public void DidFinishNavigation(WKWebView webView, WKNavigation navigation)
public virtual void DidFinishNavigation(WKWebView webView, WKNavigation navigation)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs more changes in publicAPIs (Catalyst):

D:\a\_work\1\s\src\Core\src\Platform\iOS\MauiWebViewNavigationDelegate.cs(102,23): error RS0016: Symbol 'DecidePolicy' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md) [D:\a\_work\1\s\src\Core\src\Core.csproj::TargetFramework=net10.0-maccatalyst18.2]
D:\a\_work\1\s\src\Core\src\Platform\iOS\MauiWebViewNavigationDelegate.cs(80,23): error RS0016: Symbol 'DidFailProvisionalNavigation' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md) [D:\a\_work\1\s\src\Core\src\Core.csproj::TargetFramework=net10.0-maccatalyst18.2]
D:\a\_work\1\s\src\Core\src\Platform\iOS\MauiWebViewNavigationDelegate.cs(59,23): error RS0016: Symbol 'DidFailNavigation' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md) [D:\a\_work\1\s\src\Core\src\Core.csproj::TargetFramework=net10.0-maccatalyst18.2]
D:\a\_work\1\s\src\Core\src\Platform\iOS\MauiWebViewNavigationDelegate.cs(26,23): error RS0016: Symbol 'DidFinishNavigation' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md) [D:\a\_work\1\s\src\Core\src\Core.csproj::TargetFramework=net10.0-maccatalyst18.2]
D:\a\_work\1\s\src\Core\src\PublicAPI\net-maccatalyst\PublicAPI.Shipped.txt(1722,1): error RS0017: Symbol 'Microsoft.Maui.Platform.MauiWebViewNavigationDelegate.DecidePolicy(WebKit.WKWebView! webView, WebKit.WKNavigationAction! navigationAction, System.Action<WebKit.WKNavigationActionPolicy>! decisionHandler) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md) [D:\a\_work\1\s\src\Core\src\Core.csproj::TargetFramework=net10.0-maccatalyst18.2]
D:\a\_work\1\s\src\Core\src\PublicAPI\net-maccatalyst\PublicAPI.Shipped.txt(1723,1): error RS0017: Symbol 'Microsoft.Maui.Platform.MauiWebViewNavigationDelegate.DidFailNavigation(WebKit.WKWebView! webView, WebKit.WKNavigation! navigation, Foundation.NSError! error) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md) [D:\a\_work\1\s\src\Core\src\Core.csproj::TargetFramework=net10.0-maccatalyst18.2]
D:\a\_work\1\s\src\Core\src\PublicAPI\net-maccatalyst\PublicAPI.Shipped.txt(1724,1): error RS0017: Symbol 'Microsoft.Maui.Platform.MauiWebViewNavigationDelegate.DidFailProvisionalNavigation(WebKit.WKWebView! webView, WebKit.WKNavigation! navigation, Foundation.NSError! error) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md) [D:\a\_work\1\s\src\Core\src\Core.csproj::TargetFramework=net10.0-maccatalyst18.2]
D:\a\_work\1\s\src\Core\src\PublicAPI\net-maccatalyst\PublicAPI.Shipped.txt(1725,1): error RS0017: Symbol 'Microsoft.Maui.Platform.MauiWebViewNavigationDelegate.DidFinishNavigation(WebKit.WKWebView! webView, WebKit.WKNavigation! navigation) -> void' is part of the declared API, but is either not public or could not be found (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md) [D:\a\_work\1\s\src\Core\src\Core.csproj::TargetFramework=net10.0-maccatalyst18.2]

@jfversluis
Copy link
Member Author

/azp run

Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Ready To Review
Development

Successfully merging this pull request may close these issues.

2 participants