Contents

webView(_:requestGeolocationPermissionFor:initiatedByFrame:decisionHandler:)

Declaration

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

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