Add updated WKWebView Inspectable flag#14610
Conversation
|
Glad that those Unit Tests run on earlier versions! Guess that command wasn't available in previous versions like I thought, so it does blow up. Wrapping it in a preprocessor definition should fix it. When this gets documented, we need to clarify that it's only supported on 16.4+ iOS builds and 13.3+ Mac Catalyst builds. |
|
Thank you @drasticactions ! |
|
@Eilon This issue still reproduces on .NET 8.0 Preview 4 (8.0.0-preview.4.23228.5), Maui version: 8.0.0-preview.4.23228.5. I want to confirm whether this issue will be fixed on 8.0 P4? |
|
The code is in the net8.0 branch, https://github.com/dotnet/maui/blob/net8.0/src/BlazorWebView/src/Maui/iOS/BlazorWebViewHandler.iOS.cs#L99-L102. I'm not sure what version that is though or what commit it's based on. But remember, this is not a MAUI bug or issue, this is something you can set on the webview yourself to enable this to work, it just so happened that Apple changed the API resulting in the "break" If you set the code on your MacCatlayst webview, as is linked above, that should enable it. My change (and the original code) was just automating what you could have done yourself. |
Description of Change
Adds the "Inspectable" flag to the WKWebView implementation of BlazorWebView, this should allow the Safari Dev Tools to work again.
Issues Fixed
Fixes #14590
fixes #14835