---
title: "webView(_:requestGeolocationPermissionFor:initiatedByFrame:decisionHandler:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/wkuidelegate/webview(_:requestgeolocationpermissionfor:initiatedbyframe:decisionhandler:)"
---

# webView(_:requestGeolocationPermissionFor:initiatedByFrame:decisionHandler:)

## Declaration

```swift
optional func webView(_ webView: WKWebView, requestGeolocationPermissionFor origin: WKSecurityOrigin, initiatedByFrame frame: WKFrameInfo, decisionHandler: @escaping @MainActor @Sendable (WKPermissionDecision) -> Void)
```

## Parameters

- `frame`: The frame that initiated the request.
- `decisionHandler`: The decision handler to call once the app has made its decision.

## Discussion

Discussion Allows your app to determine whether or not the given security origin should have access to geolocation APIs.
