Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This guide covers how to configure Mac Catalyst and iOS for DevFlow Blazor WebView debugging.
Important
DevFlow is experimental and will change between releases.
Prerequisites
Node.js: Required to run Appium. Install from nodejs.org.
Appium: Install globally:
npm install -g appiumXCUITest driver: Install the Appium XCUITest driver:
appium driver install xcuitestios-webkit-debug-proxy (iOS devices only): Required for WebView debugging on physical iOS devices. Install via Homebrew:
brew install ios-webkit-debug-proxyXcode command line tools: Install with:
xcode-select --install
Enable WKWebView inspection
Starting with iOS 16.4 and macOS 13.3, WKWebView instances must be explicitly marked as inspectable. Configure this through a BlazorWebViewHandler mapper in your MauiProgram.cs:
#if DEBUG && (IOS || MACCATALYST)
Microsoft.Maui.Handlers.BlazorWebViewHandler.Mapper.AppendToMapping(
"WebViewInspectable", (handler, view) =>
{
if (OperatingSystem.IsIOSVersionAtLeast(16, 4) ||
OperatingSystem.IsMacCatalystVersionAtLeast(16, 4))
{
handler.PlatformView.Inspectable = true;
}
});
#endif
Note
Without this configuration, the WebView won't appear as a debuggable target in Safari or DevFlow.
iOS device settings
On the iOS device, enable Web Inspector:
- Open Settings > Safari > Advanced.
- Enable Web Inspector.
Start Appium
Start Appium in a terminal window before running DevFlow commands that target Apple platforms:
appium
Appium runs on localhost:4723 by default.
Troubleshooting
| Issue | Possible cause | Resolution |
|---|---|---|
| WebView context not found | WKWebView is not marked as inspectable |
Verify the handler mapper code is running and that the platform version checks pass. Confirm the #if DEBUG directive is active. |
| Appium connection failures | Appium is not running or the XCUITest driver is not installed | Start Appium with appium and verify the driver is installed with appium driver list --installed. |
| ios-webkit-debug-proxy issues | Proxy not installed or device not trusted | Install via brew install ios-webkit-debug-proxy. Ensure the device is unlocked and trusts the Mac. |
| Finding device UDID | Need to identify a specific device | Run xcrun xctrace list devices or connect the device and check Finder > General > Serial Number (click to reveal UDID). |