Wails version family
v3
Exact Wails version
v3.0.0-beta.13 (also on master @ 9f2fbd3)
Operating System
macOS
Description
WebviewWindowOptions.Permissions is honoured on Linux (#5552) and on Windows through WebView2 (#5567), but has no effect on macOS. WebviewWindowDelegate is the webview's UI delegate and declares WKUIDelegate conformance, but never implements webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:type:decisionHandler: — so nothing on darwin reads the map.
Capture itself still works. WKUIDelegate.h says an unimplemented method behaves as WKPermissionDecisionPrompt, so macOS acts as though every window were permanently PermissionDefault. What's lost is the other two policies: you can't drop WebKit's prompt for a window that only loads your own content, and you can't deny capture to a window that shouldn't have it.
The docs already describe this as a known limitation — permissions.mdx says the map is "currently ignored on macOS".
To Reproduce
- Build a macOS app with
NSCameraUsageDescription and NSMicrophoneUsageDescription in its Info.plist.
- Create a window that should refuse capture:
app.Window.NewWithOptions(application.WebviewWindowOptions{
Permissions: map[application.PermissionType]application.Permission{
application.PermissionMicrophone: application.PermissionDeny,
application.PermissionCamera: application.PermissionDeny,
},
})
- Call
navigator.mediaDevices.getUserMedia({audio: true, video: true}) from it.
- WebKit prompts, and capture proceeds if the user accepts — the
PermissionDeny never applies. Configured with PermissionAllow, the prompt still appears.
Found by reading the source rather than running it: git grep requestMediaCapturePermission v3/ comes back empty, and webview_window_darwin.go:209 is the only setUIDelegate:.
Expected behaviour
The three-way policy the other platforms implement, mapped onto WKPermissionDecision:
Permission |
macOS decision |
PermissionDefault |
WKPermissionDecisionPrompt — unchanged from today |
PermissionAllow |
WKPermissionDecisionGrant |
PermissionDeny |
WKPermissionDecisionDeny |
TCC still gates the device on top, so PermissionAllow removes WebKit's prompt but not the system one. Camera and microphone only, matching the current Linux scope — the other three types have no WKUIDelegate equivalent.
Additional context
#6050 implements this.
System Details
Wails CLI v3.0.0-beta.13
Go go1.26.2
OS macOS 26.6.2 (25G83), darwin/arm64, Apple M4 Pro
Xcode 26.6 (17F113), cli tools 2416
CGO_ENABLED 1
Wails version family
v3
Exact Wails version
v3.0.0-beta.13 (also on
master@ 9f2fbd3)Operating System
macOS
Description
WebviewWindowOptions.Permissionsis honoured on Linux (#5552) and on Windows through WebView2 (#5567), but has no effect on macOS.WebviewWindowDelegateis the webview's UI delegate and declaresWKUIDelegateconformance, but never implementswebView:requestMediaCapturePermissionForOrigin:initiatedByFrame:type:decisionHandler:— so nothing on darwin reads the map.Capture itself still works.
WKUIDelegate.hsays an unimplemented method behaves asWKPermissionDecisionPrompt, so macOS acts as though every window were permanentlyPermissionDefault. What's lost is the other two policies: you can't drop WebKit's prompt for a window that only loads your own content, and you can't deny capture to a window that shouldn't have it.The docs already describe this as a known limitation — permissions.mdx says the map is "currently ignored on macOS".
To Reproduce
NSCameraUsageDescriptionandNSMicrophoneUsageDescriptionin itsInfo.plist.navigator.mediaDevices.getUserMedia({audio: true, video: true})from it.PermissionDenynever applies. Configured withPermissionAllow, the prompt still appears.Found by reading the source rather than running it:
git grep requestMediaCapturePermission v3/comes back empty, andwebview_window_darwin.go:209is the onlysetUIDelegate:.Expected behaviour
The three-way policy the other platforms implement, mapped onto
WKPermissionDecision:PermissionPermissionDefaultWKPermissionDecisionPrompt— unchanged from todayPermissionAllowWKPermissionDecisionGrantPermissionDenyWKPermissionDecisionDenyTCC still gates the device on top, so
PermissionAllowremoves WebKit's prompt but not the system one. Camera and microphone only, matching the current Linux scope — the other three types have noWKUIDelegateequivalent.Additional context
#6050 implements this.
System Details