Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changes/geolocation-permission-refactor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"geolocation": patch
---

No longer request permission automatically and leave to the user how to handle the `checkPermissions` and `requestPermissions` APIs.
5 changes: 5 additions & 0 deletions .changes/update-geolocation-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"geolocation-js": patch
---

Update API to match other plugins.
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions examples/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
"@tauri-apps/plugin-clipboard-manager": "2.0.0-rc.1",
"@tauri-apps/plugin-dialog": "2.0.0-rc.1",
"@tauri-apps/plugin-fs": "2.0.0-rc.2",
"@tauri-apps/plugin-geolocation": "2.0.0-rc.1",
"@tauri-apps/plugin-global-shortcut": "2.0.0-rc.1",
"@tauri-apps/plugin-haptics": "2.0.0-rc.1",
"@tauri-apps/plugin-http": "2.0.0-rc.2",
"@tauri-apps/plugin-nfc": "2.0.0-rc.1",
"@tauri-apps/plugin-notification": "2.0.0-rc.1",
Expand Down
2 changes: 2 additions & 0 deletions examples/api/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.0.0-rc.
tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.0.0-rc.4" }
tauri-plugin-nfc = { path = "../../../plugins/nfc", version = "2.0.0-rc.3" }
tauri-plugin-biometric = { path = "../../../plugins/biometric/", version = "2.0.0-rc.3" }
tauri-plugin-geolocation = { path = "../../../plugins/geolocation/", version = "2.0.0-rc.3" }
tauri-plugin-haptics = { path = "../../../plugins/haptics/", version = "2.0.0-rc.3" }

[target."cfg(target_os = \"windows\")".dependencies]
window-shadows = "0.2"
Expand Down
6 changes: 5 additions & 1 deletion examples/api/src-tauri/capabilities/mobile.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
"barcode-scanner:allow-scan",
"barcode-scanner:allow-cancel",
"barcode-scanner:allow-request-permissions",
"barcode-scanner:allow-check-permissions"
"barcode-scanner:allow-check-permissions",
"geolocation:allow-check-permissions",
"geolocation:allow-request-permissions",
"geolocation:allow-watch-position",
"geolocation:allow-get-current-position"
]
}
1 change: 0 additions & 1 deletion examples/api/src-tauri/gen/android/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

152 changes: 152 additions & 0 deletions examples/api/src-tauri/gen/schemas/mobile-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -6747,6 +6747,158 @@
"fs:write-files"
]
},
{
"type": "string",
"enum": [
"geolocation:default"
]
},
{
"description": "geolocation:allow-check-permissions -> Enables the check_permissions command without any pre-configured scope.",
"type": "string",
"enum": [
"geolocation:allow-check-permissions"
]
},
{
"description": "geolocation:allow-clear-permissions -> Enables the clear_permissions command without any pre-configured scope.",
"type": "string",
"enum": [
"geolocation:allow-clear-permissions"
]
},
{
"description": "geolocation:allow-clear-watch -> Enables the clear_watch command without any pre-configured scope.",
"type": "string",
"enum": [
"geolocation:allow-clear-watch"
]
},
{
"description": "geolocation:allow-get-current-position -> Enables the get_current_position command without any pre-configured scope.",
"type": "string",
"enum": [
"geolocation:allow-get-current-position"
]
},
{
"description": "geolocation:allow-request-permissions -> Enables the request_permissions command without any pre-configured scope.",
"type": "string",
"enum": [
"geolocation:allow-request-permissions"
]
},
{
"description": "geolocation:allow-watch-position -> Enables the watch_position command without any pre-configured scope.",
"type": "string",
"enum": [
"geolocation:allow-watch-position"
]
},
{
"description": "geolocation:deny-check-permissions -> Denies the check_permissions command without any pre-configured scope.",
"type": "string",
"enum": [
"geolocation:deny-check-permissions"
]
},
{
"description": "geolocation:deny-clear-permissions -> Denies the clear_permissions command without any pre-configured scope.",
"type": "string",
"enum": [
"geolocation:deny-clear-permissions"
]
},
{
"description": "geolocation:deny-clear-watch -> Denies the clear_watch command without any pre-configured scope.",
"type": "string",
"enum": [
"geolocation:deny-clear-watch"
]
},
{
"description": "geolocation:deny-get-current-position -> Denies the get_current_position command without any pre-configured scope.",
"type": "string",
"enum": [
"geolocation:deny-get-current-position"
]
},
{
"description": "geolocation:deny-request-permissions -> Denies the request_permissions command without any pre-configured scope.",
"type": "string",
"enum": [
"geolocation:deny-request-permissions"
]
},
{
"description": "geolocation:deny-watch-position -> Denies the watch_position command without any pre-configured scope.",
"type": "string",
"enum": [
"geolocation:deny-watch-position"
]
},
{
"type": "string",
"enum": [
"haptics:default"
]
},
{
"description": "haptics:allow-impact-feedback -> Enables the impact_feedback command without any pre-configured scope.",
"type": "string",
"enum": [
"haptics:allow-impact-feedback"
]
},
{
"description": "haptics:allow-notification-feedback -> Enables the notification_feedback command without any pre-configured scope.",
"type": "string",
"enum": [
"haptics:allow-notification-feedback"
]
},
{
"description": "haptics:allow-selection-feedback -> Enables the selection_feedback command without any pre-configured scope.",
"type": "string",
"enum": [
"haptics:allow-selection-feedback"
]
},
{
"description": "haptics:allow-vibrate -> Enables the vibrate command without any pre-configured scope.",
"type": "string",
"enum": [
"haptics:allow-vibrate"
]
},
{
"description": "haptics:deny-impact-feedback -> Denies the impact_feedback command without any pre-configured scope.",
"type": "string",
"enum": [
"haptics:deny-impact-feedback"
]
},
{
"description": "haptics:deny-notification-feedback -> Denies the notification_feedback command without any pre-configured scope.",
"type": "string",
"enum": [
"haptics:deny-notification-feedback"
]
},
{
"description": "haptics:deny-selection-feedback -> Denies the selection_feedback command without any pre-configured scope.",
"type": "string",
"enum": [
"haptics:deny-selection-feedback"
]
},
{
"description": "haptics:deny-vibrate -> Denies the vibrate command without any pre-configured scope.",
"type": "string",
"enum": [
"haptics:deny-vibrate"
]
},
{
"description": "http:default -> This permission set configures what kind of\nfetch operations are available from the http plugin.\n\nThis enables all fetch operations but does not\nallow explicitly any origins to be fetched. This needs to\nbe manually configured before usage.\n\n#### Granted Permissions\n\nAll fetch operations are enabled.\n\n",
"type": "string",
Expand Down
2 changes: 2 additions & 0 deletions examples/api/src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ pub fn run() {
app.handle().plugin(tauri_plugin_barcode_scanner::init())?;
app.handle().plugin(tauri_plugin_nfc::init())?;
app.handle().plugin(tauri_plugin_biometric::init())?;
app.handle().plugin(tauri_plugin_geolocation::init())?;
app.handle().plugin(tauri_plugin_haptics::init())?;
}

let mut webview_window_builder =
Expand Down
Loading
Loading