Skip to content

Commit

Permalink
docs: document permissions example for geolocation plugin (#2044)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbousquie authored Nov 14, 2024
1 parent d402c38 commit 5700bd2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions plugins/geolocation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5700bd2

Please sign in to comment.