Skip to content

Commit 5700bd2

Browse files
authored
docs: document permissions example for geolocation plugin (#2044)
1 parent d402c38 commit 5700bd2

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

plugins/geolocation/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,20 @@ fn main() {
9292
}
9393
```
9494

95+
Then, for instance, grant the plugin the permission to check or request permissions from the user and to read the device position
96+
97+
`src-tauri/capabilities/default.json`
98+
99+
```json
100+
"permissions": [
101+
"core:default",
102+
"geolocation:allow-check-permissions",
103+
"geolocation:allow-request-permissions",
104+
"geolocation:allow-get-current-position",
105+
"geolocation:allow-watch-position",
106+
]
107+
```
108+
95109
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
96110

97111
```javascript

0 commit comments

Comments
 (0)