Naved Khan
Naved Khan

Reputation: 1

MAUI Mac Catalyst Webview issue: Permission popup not showing

When i am using webview to ask for camera permission in dotnet maui in macbook, the permission to ask for camera permission is not asking in my case.

this is my code:

public OpenCameraPermissionPage()
{
    InitializeComponent();
    BindingContext = ServiceLocator.GetService<OpenCameraPermissionViewModel>();
    LoadFaceAuthPage();
    Shell.SetBackButtonBehavior(this, new BackButtonBehavior
    {
        IsVisible = false
    });
}

private void LoadFaceAuthPage()
{
    // Your logic to load the web page goes here
    webView.Source = "https://opencampermission.com";
}

protected override async void OnAppearing()
{
    base.OnAppearing();
    var vm = (BindingContext as OpenCameraPermissionViewModel);
    await vm.Init();
    webView.Reload();
    foreach (var item in MenuBarItems)
    {
        item.BindingContext = BindingContext;
    }
}

enter image description here

Upvotes: 0

Views: 106

Answers (0)

Related Questions