From 5700bd2213d9511ada39ea66dbc30d734f29461f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Bousqui=C3=A9?= Date: Thu, 14 Nov 2024 16:58:11 +0100 Subject: [PATCH] docs: document permissions example for geolocation plugin (#2044) --- plugins/geolocation/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/plugins/geolocation/README.md b/plugins/geolocation/README.md index 9f99f973a..dd9d8e613 100644 --- a/plugins/geolocation/README.md +++ b/plugins/geolocation/README.md @@ -92,6 +92,20 @@ fn main() { } ``` +Then, for instance, grant the plugin the permission to check or request permissions from the user and to read the device position + +`src-tauri/capabilities/default.json` + +```json + "permissions": [ + "core:default", + "geolocation:allow-check-permissions", + "geolocation:allow-request-permissions", + "geolocation:allow-get-current-position", + "geolocation:allow-watch-position", + ] +``` + Afterwards all the plugin's APIs are available through the JavaScript guest bindings: ```javascript