Skip to content

Commit d05ba1f

Browse files
authored
Update README.md
Added the required permissions in the geolocation plugin documentation so that the code example can run.
1 parent e421b9a commit d05ba1f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

plugins/geolocation/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,16 @@ fn main() {
9191
.expect("error while running tauri application");
9292
}
9393
```
94-
94+
Then, for instance, grant the plugin the permission to check or request permissions from the user and to read the device position in the file `src-tauri/capabilities/default.json`
95+
```
96+
"permissions": [
97+
"core:default",
98+
"geolocation:allow-check-permissions",
99+
"geolocation:allow-request-permissions",
100+
"geolocation:allow-get-current-position",
101+
"geolocation:allow-watch-position",
102+
]
103+
```
95104
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
96105

97106
```javascript

0 commit comments

Comments
 (0)