maui
maui copied to clipboard
[Catalyst] Allow to use a custom WKUIDelegate on WebView
Description of Change
Error with a simple fix that I have seen doing triage taking a look to new issues. Allow to use a custom WKUIDelegate
on WebView
Issues Fixed
Fixes #18394
Do we have any tests for this - even for iOS?
Line 31 should be || MacCatalyst, not && MacCatalyst. With AND operation, the conditional statement will not work on iOS and Mac. Please kindly change it! Thanks.
Do we have any tests for this - even for iOS?
Yes. Use this project. https://github.com/dotnet/maui/issues/17431
Discussion was done in https://stackoverflow.com/questions/77170252/requestcapturemediapermission-for-wkwebview-in-maui-ios/77200328
I mean do we have any unit or device tests in Maui? The fact that this PR is green and the wrong condition means that we don't and should. All changes should have a test to ensure that it never breaks again.
With current main repository, Line 15 on Platforms/iOS/WebViewUIDelegate.cs of this project https://github.com/tekmun/WebViewIssue.git will be called for iOS.
I have not tested it on Mac though. Can someone test whether with the suggested changes, Line 15 on Platforms/iOS/WebViewUIDelegate.cs will be called on Mac/MacCatalyst? In theory, it should.
If it works, then this project https://github.com/tekmun/WebViewIssue.git can be easily converted to become a unit test because it needs to ensure Line 15 on Platforms/iOS/WebViewUIDelegate.cs and Platforms/MacCatalyst/WebViewUIDelegate.cs are called.
Can this change make it into GA next week?
This change is not destructive, meaning that it will not affect systems that are working now. It just allows the MacCatalyst app to have the same functionality as the iOS app. Please kindly merge the changes before GA next week. Thanks.
Any updates on when the merging of this code into the main repository?
I mean do we have any unit or device tests in Maui? The fact that this PR is green and the wrong condition means that we don't and should. All changes should have a test to ensure that it never breaks again.
Require a custom WKUIDelegate and handlers, already added a sample in the Gallery.
Any updates on when the merging of this code into the main repository? I understand maui is now a nuget package and we can use <MauiVersion> to download a nightly build. Can I test it out soon?
It looks like the test case has been added and all checks have passed. Can the reviewers approve this request into the main branch?
The requested change has not been reflected in the main branch. Why is request marked as DONE?
Yay, build is passing. Could we get another review here?
https://github.com/dotnet/maui/pull/18483#discussion_r1536671820