Compare commits

..

24 Commits

Author SHA1 Message Date
github-actions[bot] 8a45c35160 publish new versions (#1764)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2024-09-12 15:49:29 -03:00
Lucas Nogueira ebf821afd1 chore(examples): update AndroidManifest.xml 2024-09-12 15:32:27 -03:00
Lucas Fernandes Nogueira 984110a978 fix(deep-link): emit new-url event on app load (#1770) 2024-09-12 11:20:16 -03:00
Lucas Fernandes Nogueira 2b898f0786 fix(dialog): update asset protocol scope on directory open, closes #1553 (#1769) 2024-09-12 11:10:16 -03:00
Tony b2269333e3 chore(single-instance): put deep link integration behined a feature (#1766)
* Make deep link optional for single instance

* Add change file

* Add deep-link feature to example

* Update plugins/deep-link/README.md

Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>

* format

* [skip ci] update readme

---------

Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>
2024-09-12 18:20:15 +08:00
renovate[bot] 41afcae399 chore(deps): update dependency rollup to v4.21.3 (v2) (#1767)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-12 12:01:38 +02:00
SRutile 9291e4d2ca fix(fs): support any UTF-8 path in writeFile (#1640)
* In the `writeFile` function, when `options.baseDir` is not set, convert `path` to URL to avoid errors caused by Chinese characters.

* fmt

* use TextEncoder

* use percent encoding

* add change file

* fmt

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2024-09-11 12:02:24 -03:00
renovate[bot] 3715f3c9a6 chore(deps): update tauri monorepo (#1760)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-11 09:12:13 +08:00
github-actions[bot] 253ae66210 publish new versions (#1761) 2024-09-10 16:14:05 -03:00
Lucas Nogueira 949e2d6c45 chore: update docs 2024-09-10 16:02:38 -03:00
Lucas Fernandes Nogueira 64a6240f79 feat(deep-link): implement getCurrent on Windows/Linux (#1759)
* feat(deep-link): implement getCurrent on Windows/Linux

checks std::env::args() on initialization, also includes integration with the single-instance plugin

* fmt

* update docs, fix event

* add register_all function

* expose api

* be nicer on docs, clippy
2024-09-10 16:00:42 -03:00
github-actions[bot] 77680f6ed8 publish new versions (#1740)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2024-09-10 13:06:48 -03:00
Lucas Fernandes Nogueira 8c3a6a253d feat(barcode-scanner): validate missing Info.plist configuration (#1758) 2024-09-10 12:24:03 -03:00
Lucas Nogueira 57fd28126c chore(examples): add NFCReaderUsageDescription Info.plist, entitlement 2024-09-10 08:45:43 -03:00
Lucas Fernandes Nogueira a34fade500 chore(ios): consolidate optional argument standard (#1738)
* chore(ios): consolidate optional argument standard

mark all optional iOS arguments as `var <name>: Type?`, following the pattern described in the documentation: https://v2.tauri.app/develop/plugins/develop-mobile/#ios

* chore: add missing Info.plist to example
2024-09-10 08:31:39 -03:00
Olivier Lemasle 713c54ef83 chore(barcode): remove unused Android dependencies (#1749)
* chore(barcode): remove unused Android dependencies

Plugin barcode-scanner has two unused Android dependencies:
- com.google.zxing:core
- com.journeyapps:zxing-android-embedded

However, these dependency's AndroidManifest.xml were merged, and contained
required parameters (to get camera's permissions).

See the merged manifests:
- https://github.com/zxing/zxing/blob/zxing-3.3.0/android/AndroidManifest.xml
- https://github.com/journeyapps/zxing-android-embedded/blob/v4.3.0/zxing-android-embedded/AndroidManifest.xml

This commit removes the unused dependencies (and unused Java imports)
and updates the Android manifest.

* chore: remove comments

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-09-10 08:01:29 -03:00
renovate[bot] a9b2a9af84 chore(deps): update dependency typescript to v5.6.2 (v2) (#1754)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-09 21:28:08 +02:00
renovate[bot] c23b3d4bc8 chore(deps): update dependency typescript-eslint to v8.5.0 (v2) (#1755)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-09 21:24:20 +02:00
Kauan Curbani 0dd97d9115 feat(sql): added uuid type in postgres decoder (#1375)
Co-authored-by: Kauan Curbani <kauan.curbani@segalas.local>
Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>
2024-09-09 17:40:45 +02:00
renovate[bot] 3912800db3 chore(deps): lock file maintenance (#1753)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-09 13:35:43 +08:00
renovate[bot] c23d7c51f6 chore(deps): lock file maintenance (#1751)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-09 11:22:59 +08:00
renovate[bot] 5906cf4335 chore(deps): update eslint monorepo to v9.10.0 (v2) (#1744)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-08 18:12:08 +02:00
renovate[bot] d4a54157f0 chore(deps): update tauri monorepo (#1739)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-06 09:19:57 +08:00
Lucas Fernandes Nogueira 3d301c654e fix(notification): body should be optional on iOS (#1737) 2024-09-05 17:46:04 -03:00
80 changed files with 1528 additions and 1288 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"barcode-scanner": patch
---
Remove unused Android dependencies.
@@ -0,0 +1,5 @@
---
"barcode-scanner": patch
---
Validate missing `NSCameraUsageDescription` Info.plist value.
+2 -1
View File
@@ -268,7 +268,8 @@
},
"single-instance": {
"path": "./plugins/single-instance",
"manager": "rust"
"manager": "rust",
"dependencies": ["deep-link"]
},
"sql": {
"path": "./plugins/sql",
+6
View File
@@ -0,0 +1,6 @@
---
"deep-link": patch
---
Emit the `deep-link://new-url` event on Linux and Windows when the app is executed with a deep link CLI argument,
matching the iOS and macOS behavior.
@@ -0,0 +1,6 @@
---
"deep-link": patch
"deep-link-js": patch
---
Implement `get_current` on Linux and Windows.
+5
View File
@@ -0,0 +1,5 @@
---
"deep-link": patch
---
Added `register_all` to register all desktop schemes - useful for Linux to not require a formal AppImage installation.
+5
View File
@@ -0,0 +1,5 @@
---
"dialog": patch
---
Update Tauri scopes (asset protocol) when using the `open()` command to select directories.
+5
View File
@@ -0,0 +1,5 @@
---
"fs": patch
---
Support any UTF-8 character in the writeFile API.
@@ -0,0 +1,5 @@
---
"notification": patch
---
The notification body is now optional on iOS to match the other platforms.
+11
View File
@@ -2,7 +2,13 @@
"tag": "rc",
"changes": [
".changes/android-dialog-save.md",
".changes/barcode-dependencies.md",
".changes/barcode-scanner-validate-plist.md",
".changes/consolidate-permission-state.md",
".changes/deep-link-event.md",
".changes/deep-link-get-current-desktop.md",
".changes/deep-link-register-all.md",
".changes/dialog-asset-scope.md",
".changes/dialog-file-response-non-exhaustive.md",
".changes/dialog-return-path.md",
".changes/fix-deep-link-config.md",
@@ -17,18 +23,23 @@
".changes/fs-dialog-safe-file-path.md",
".changes/fs-scope-recursive-allow-read-dir.md",
".changes/fs-windows-path.md",
".changes/fs-write-file-utf8-chars.md",
".changes/geolocation-release.md",
".changes/global-shortcut-0.6.md",
".changes/haptics-release.md",
".changes/iife-varname-spacing.md",
".changes/ios-dialog-save.md",
".changes/notification-body-optional-ios.md",
".changes/notification-permission-type-change.md",
".changes/rc.md",
".changes/remove-target-sdk.md",
".changes/resolve-content-uris.md",
".changes/shell-open-regex-match-string.md",
".changes/shell-regex-match-string.md",
".changes/single-instance-deep-link.md",
".changes/single-instance-optional-deep-link.md",
".changes/single-instance-windows-sys.0.59.md",
".changes/sql-uuid-type.md",
".changes/store-remove-mobile-plugin.md",
".changes/swift-build-older-versions.md",
".changes/tauri-rc-8.md",
+5
View File
@@ -0,0 +1,5 @@
---
"single-instance": patch
---
Integrate with the deep link plugin out of the box.
@@ -0,0 +1,5 @@
---
"single-instance": "patch"
---
Put deep link integration behined a feature
+5
View File
@@ -0,0 +1,5 @@
---
"sql": patch
---
Added support for `UUID` columns to the postgres implementation.
Generated
+290 -335
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -11,10 +11,10 @@ resolver = "2"
[workspace.dependencies]
serde = { version = "1", features = ["derive"] }
log = "0.4"
tauri = { version = "2.0.0-rc.9", default-features = false }
tauri-build = "2.0.0-rc.8"
tauri-plugin = "2.0.0-rc.8"
tauri-utils = "2.0.0-rc.8"
tauri = { version = "2.0.0-rc.11", default-features = false }
tauri-build = "2.0.0-rc.10"
tauri-plugin = "2.0.0-rc.10"
tauri-utils = "2.0.0-rc.10"
serde_json = "1"
thiserror = "1"
url = "2"
+1 -1
View File
@@ -31,7 +31,7 @@
"@iconify-json/codicon": "^1.1.37",
"@iconify-json/ph": "^1.1.8",
"@sveltejs/vite-plugin-svelte": "^3.0.1",
"@tauri-apps/cli": "2.0.0-rc.11",
"@tauri-apps/cli": "2.0.0-rc.13",
"@unocss/extractor-svelte": "^0.62.0",
"svelte": "^4.2.19",
"unocss": "^0.62.0",
+15
View File
@@ -1,5 +1,20 @@
# Changelog
## \[2.0.0-rc.6]
### Dependencies
- Upgraded to `dialog@2.0.0-rc.6`
- Upgraded to `fs@2.0.0-rc.4`
- Upgraded to `http@2.0.0-rc.4`
## \[2.0.0-rc.5]
### Dependencies
- Upgraded to `barcode-scanner@2.0.0-rc.4`
- Upgraded to `notification@2.0.0-rc.4`
## \[2.0.0-rc.4]
### Dependencies
+6 -6
View File
@@ -1,7 +1,7 @@
[package]
name = "api"
publish = false
version = "2.0.0-rc.4"
version = "2.0.0-rc.6"
description = "An example Tauri Application showcasing the api"
edition = "2021"
rust-version = { workspace = true }
@@ -20,15 +20,15 @@ serde = { workspace = true }
tiny_http = "0.12"
log = { workspace = true }
tauri-plugin-log = { path = "../../../plugins/log", version = "2.0.0-rc.2" }
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.0.0-rc.3", features = [
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.0.0-rc.4", features = [
"watch",
] }
tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.0.0-rc.3" }
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.0.0-rc.5" }
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.0.0-rc.6" }
tauri-plugin-http = { path = "../../../plugins/http", features = [
"multipart",
], version = "2.0.0-rc.3" }
tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.0.0-rc.3", features = [
], version = "2.0.0-rc.4" }
tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.0.0-rc.4", features = [
"windows7-compat",
] }
tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.0-rc.1" }
@@ -55,7 +55,7 @@ tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", vers
tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.0.0-rc.3" }
[target."cfg(any(target_os = \"android\", target_os = \"ios\"))".dependencies]
tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.0.0-rc.3" }
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" }
+10 -6
View File
@@ -1,10 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSCameraUsageDescription</key>
<string>Request camera access for WebRTC</string>
<key>NSMicrophoneUsageDescription</key>
<string>Request microphone access for WebRTC</string>
</dict>
<dict>
<key>NSCameraUsageDescription</key>
<string>Request camera access for WebRTC</string>
<key>NSMicrophoneUsageDescription</key>
<string>Request microphone access for WebRTC</string>
<key>NSFaceIDUsageDescription</key>
<string>Authenticate with biometrics</string>
<key>NFCReaderUsageDescription</key>
<string>Read and write to NFC tags for testing</string>
</dict>
</plist>
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 54;
objectVersion = 56;
objects = {
/* Begin PBXBuildFile section */
@@ -22,26 +22,26 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
0E96CE07CD20273DD46BF325 /* main.rs */ = {isa = PBXFileReference; path = main.rs; sourceTree = "<group>"; };
1C1AB1B414CA2795AFBEDDB9 /* tray.rs */ = {isa = PBXFileReference; path = tray.rs; sourceTree = "<group>"; };
0E96CE07CD20273DD46BF325 /* main.rs */ = {isa = PBXFileReference; lastKnownFileType = text; path = main.rs; sourceTree = "<group>"; };
1C1AB1B414CA2795AFBEDDB9 /* tray.rs */ = {isa = PBXFileReference; lastKnownFileType = text; path = tray.rs; sourceTree = "<group>"; };
248286BAA086BB1A5F98B2B2 /* libapp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libapp.a; sourceTree = "<group>"; };
2F63E2AA460089BB58D40C79 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
338E66700FD330B99D434DD7 /* MetalKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MetalKit.framework; path = System/Library/Frameworks/MetalKit.framework; sourceTree = SDKROOT; };
384966E551417F94A02D2706 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
4B2D1B108AE002010BDEC6D2 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
59CFE20DCF760BE67D9CE3D6 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
5AC703CEBA41A121596066F3 /* api_iOS.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = api_iOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
5AC703CEBA41A121596066F3 /* Tauri API.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Tauri API.app"; sourceTree = BUILT_PRODUCTS_DIR; };
62601E25FA39E62BE119B74D /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
6B7E79E23E646BA7968B457C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
71EB788DE4662CFC0D97F567 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
74A8FDFB350B966F5AAD4A24 /* assets */ = {isa = PBXFileReference; lastKnownFileType = folder; path = assets; sourceTree = SOURCE_ROOT; };
785D025E9542F7E098BF22B5 /* lib.rs */ = {isa = PBXFileReference; path = lib.rs; sourceTree = "<group>"; };
785D025E9542F7E098BF22B5 /* lib.rs */ = {isa = PBXFileReference; lastKnownFileType = text; path = lib.rs; sourceTree = "<group>"; };
879941AE3DAA14534BBC6391 /* api_iOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = api_iOS.entitlements; sourceTree = "<group>"; };
90D3B673AFAB8D8AB561F616 /* main.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = "<group>"; };
B6082E363D51372A7658C351 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
DC377692DC31A070A0188C9D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
EC8C7948C50C3C9B5D96CB61 /* bindings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = bindings.h; sourceTree = "<group>"; };
F835F52713CE8F029D5D252C /* cmd.rs */ = {isa = PBXFileReference; path = cmd.rs; sourceTree = "<group>"; };
F835F52713CE8F029D5D252C /* cmd.rs */ = {isa = PBXFileReference; lastKnownFileType = text; path = cmd.rs; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -104,7 +104,7 @@
4AC51E67B71E27F15B02C5CD /* Products */ = {
isa = PBXGroup;
children = (
5AC703CEBA41A121596066F3 /* api_iOS.app */,
5AC703CEBA41A121596066F3 /* Tauri API.app */,
);
name = Products;
sourceTree = "<group>";
@@ -172,7 +172,7 @@
);
name = api_iOS;
productName = api_iOS;
productReference = 5AC703CEBA41A121596066F3 /* api_iOS.app */;
productReference = 5AC703CEBA41A121596066F3 /* Tauri API.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
@@ -386,6 +386,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = api_iOS/api_iOS.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = Q93MBH6S2F;
ENABLE_BITCODE = NO;
"EXCLUDED_ARCHS[sdk=iphoneos*]" = "arm64-sim x86_64";
@@ -395,19 +396,37 @@
"\".\"",
);
INFOPLIST_FILE = api_iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
"LIBRARY_SEARCH_PATHS[arch=arm64-sim]" = "$(inherited) $(PROJECT_DIR)/Externals/arm64-sim/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
"LIBRARY_SEARCH_PATHS[arch=arm64]" = "$(inherited) $(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
"LIBRARY_SEARCH_PATHS[arch=x86_64]" = "$(inherited) $(PROJECT_DIR)/Externals/x86_64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
"LIBRARY_SEARCH_PATHS[arch=arm64-sim]" = (
"$(inherited)",
"$(PROJECT_DIR)/Externals/arm64-sim/$(CONFIGURATION)",
"$(SDKROOT)/usr/lib/swift",
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)",
"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)",
);
"LIBRARY_SEARCH_PATHS[arch=arm64]" = (
"$(inherited)",
"$(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION)",
"$(SDKROOT)/usr/lib/swift",
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)",
"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)",
);
"LIBRARY_SEARCH_PATHS[arch=x86_64]" = (
"$(inherited)",
"$(PROJECT_DIR)/Externals/x86_64/$(CONFIGURATION)",
"$(SDKROOT)/usr/lib/swift",
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)",
"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)",
);
PRODUCT_BUNDLE_IDENTIFIER = com.tauri.api;
PRODUCT_NAME = "Tauri API";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALID_ARCHS = "arm64 arm64-sim";
CODE_SIGN_STYLE = Automatic;
};
name = debug;
};
@@ -422,6 +441,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = api_iOS/api_iOS.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = Q93MBH6S2F;
ENABLE_BITCODE = NO;
"EXCLUDED_ARCHS[sdk=iphoneos*]" = "arm64-sim x86_64";
@@ -431,19 +451,37 @@
"\".\"",
);
INFOPLIST_FILE = api_iOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
"LIBRARY_SEARCH_PATHS[arch=arm64-sim]" = "$(inherited) $(PROJECT_DIR)/Externals/arm64-sim/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
"LIBRARY_SEARCH_PATHS[arch=arm64]" = "$(inherited) $(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
"LIBRARY_SEARCH_PATHS[arch=x86_64]" = "$(inherited) $(PROJECT_DIR)/Externals/x86_64/$(CONFIGURATION) $(SDKROOT)/usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)";
"LIBRARY_SEARCH_PATHS[arch=arm64-sim]" = (
"$(inherited)",
"$(PROJECT_DIR)/Externals/arm64-sim/$(CONFIGURATION)",
"$(SDKROOT)/usr/lib/swift",
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)",
"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)",
);
"LIBRARY_SEARCH_PATHS[arch=arm64]" = (
"$(inherited)",
"$(PROJECT_DIR)/Externals/arm64/$(CONFIGURATION)",
"$(SDKROOT)/usr/lib/swift",
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)",
"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)",
);
"LIBRARY_SEARCH_PATHS[arch=x86_64]" = (
"$(inherited)",
"$(PROJECT_DIR)/Externals/x86_64/$(CONFIGURATION)",
"$(SDKROOT)/usr/lib/swift",
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)",
"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)",
);
PRODUCT_BUNDLE_IDENTIFIER = com.tauri.api;
PRODUCT_NAME = "Tauri API";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALID_ARCHS = "arm64 arm64-sim";
CODE_SIGN_STYLE = Automatic;
};
name = release;
};
@@ -40,9 +40,13 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>NSFaceIDUsageDescription</key>
<string>Authenticate with biometrics</string>
<key>NSCameraUsageDescription</key>
<string>Request camera access for WebRTC</string>
<key>NSMicrophoneUsageDescription</key>
<string>Request microphone access for WebRTC</string>
<key>NFCReaderUsageDescription</key>
<string>Read and write to NFC tags for testing</string>
</dict>
</plist>
@@ -1,5 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
<dict>
<key>com.apple.developer.nfc.readersession.formats</key>
<array>
<string>TAG</string>
</array>
</dict>
</plist>
+1 -1
View File
@@ -2,7 +2,7 @@ name: api
options:
bundleIdPrefix: com.tauri.api
deploymentTarget:
iOS: 13.0
iOS: 14.0
fileGroups: [../../src]
configs:
debug: debug
+3
View File
@@ -100,6 +100,9 @@
}
}
}
},
"iOS": {
"minimumSystemVersion": "14.0"
}
}
}
+5 -5
View File
@@ -10,20 +10,20 @@
"format:check": "prettier --check ."
},
"devDependencies": {
"@eslint/js": "9.9.1",
"@eslint/js": "9.10.0",
"@rollup/plugin-node-resolve": "15.2.3",
"@rollup/plugin-terser": "0.4.4",
"@rollup/plugin-typescript": "11.1.6",
"@types/eslint__js": "8.42.3",
"covector": "^0.12.0",
"eslint": "9.9.1",
"eslint": "9.10.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-security": "3.0.1",
"prettier": "3.3.3",
"rollup": "4.21.2",
"rollup": "4.21.3",
"tslib": "2.7.0",
"typescript": "5.5.4",
"typescript-eslint": "8.4.0"
"typescript": "5.6.2",
"typescript-eslint": "8.5.0"
},
"resolutions": {
"semver": ">=7.5.2",
+5
View File
@@ -1,5 +1,10 @@
# Changelog
## \[2.0.0-rc.4]
- [`713c54ef`](https://github.com/tauri-apps/plugins-workspace/commit/713c54ef8365d36afd84585dcabed2fbb751223d) ([#1749](https://github.com/tauri-apps/plugins-workspace/pull/1749) by [@olivierlemasle](https://github.com/tauri-apps/plugins-workspace/../../olivierlemasle)) Remove unused Android dependencies.
- [`8c3a6a25`](https://github.com/tauri-apps/plugins-workspace/commit/8c3a6a253d7029d370659d2102f91a458745d345) ([#1758](https://github.com/tauri-apps/plugins-workspace/pull/1758) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Validate missing `NSCameraUsageDescription` Info.plist value.
## \[2.0.0-rc.1]
- [`e2e97db5`](https://github.com/tauri-apps/plugins-workspace/commit/e2e97db51983267f5be84d4f6f0278d58834d1f5) ([#1701](https://github.com/tauri-apps/plugins-workspace/pull/1701) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Use `PermissionState` from the `tauri` crate, which now also includes a "prompt with rationale" variant for Android (returned when your app must explain to the user why it needs the permission).
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-barcode-scanner"
version = "2.0.0-rc.3"
version = "2.0.0-rc.4"
description = "Scan QR codes, EAN-13 and other kinds of barcodes on Android and iOS"
edition = { workspace = true }
authors = { workspace = true }
@@ -47,9 +47,5 @@ dependencies {
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
implementation("com.journeyapps:zxing-android-embedded:4.3.0") {
isTransitive = false
}
implementation("com.google.zxing:core:3.3.0")
implementation(project(":tauri-android"))
}
@@ -2,10 +2,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:hardwareAccelerated="true">
<!-- Paste the following line into the AndroidManifest.xml of your project -->
<!-- See also: https://capacitorjs.com/docs/plugins/android#manifest -->
<!-- <uses-feature android:name="android.hardware.camera" android:required="false" /> -->
<uses-sdk tools:overrideLibrary="com.google.zxing.client.android" />
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.VIBRATE" />
<uses-feature android:name="android.hardware.camera.any"/>
</manifest>
@@ -42,7 +42,6 @@ import app.tauri.annotation.Permission
import app.tauri.annotation.PermissionCallback
import app.tauri.annotation.TauriPlugin
import app.tauri.plugin.Invoke
import app.tauri.plugin.JSArray
import app.tauri.plugin.JSObject
import app.tauri.plugin.Plugin
import com.google.common.util.concurrent.ListenableFuture
@@ -50,7 +49,6 @@ import com.google.mlkit.vision.barcode.BarcodeScannerOptions
import com.google.mlkit.vision.barcode.BarcodeScanning
import com.google.mlkit.vision.barcode.common.Barcode
import com.google.mlkit.vision.common.InputImage
import org.json.JSONException
import java.util.Collections
import java.util.concurrent.ExecutionException
@@ -9,8 +9,8 @@ import WebKit
struct ScanOptions: Decodable {
var formats: [SupportedFormat]?
let windowed: Bool?
let cameraDirection: String?
var windowed: Bool?
var cameraDirection: String?
}
enum SupportedFormat: String, CaseIterable, Decodable {
@@ -262,6 +262,13 @@ class BarcodeScannerPlugin: Plugin, AVCaptureMetadataOutputObjectsDelegate {
self.invoke = invoke
let entry = Bundle.main.infoDictionary?["NSCameraUsageDescription"] as? String
if entry == nil || entry?.count == 0 {
invoke.reject("NSCameraUsageDescription is not in the app Info.plist")
return
}
var iOS14min: Bool = false
if #available(iOS 14.0, *) { iOS14min = true }
if !iOS14min && self.getPermissionState() != "granted" {
@@ -25,8 +25,8 @@ class BiometricStatus {
struct AuthOptions: Decodable {
let reason: String
var allowDeviceCredential: Bool?
let fallbackTitle: String?
let cancelTitle: String?
var fallbackTitle: String?
var cancelTitle: String?
}
class BiometricPlugin: Plugin {
+12
View File
@@ -1,5 +1,14 @@
# Changelog
## \[2.0.0-rc.5]
- [`984110a9`](https://github.com/tauri-apps/plugins-workspace/commit/984110a978774712bad4d746ed06134d54debcd0) ([#1770](https://github.com/tauri-apps/plugins-workspace/pull/1770) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Emit the `deep-link://new-url` event on Linux and Windows when the app is executed with a deep link CLI argument,
matching the iOS and macOS behavior.
## \[2.0.0-rc.2]
- [`64a6240f`](https://github.com/tauri-apps/plugins-workspace/commit/64a6240f79fcd52267c8d721b727ae695055d7ff) ([#1759](https://github.com/tauri-apps/plugins-workspace/pull/1759) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Implement `get_current` on Linux and Windows.
## \[2.0.0-rc.3]
- [`4654591d`](https://github.com/tauri-apps/plugins-workspace/commit/4654591d820403d6fa1a007fd55bb0d85947a6cc) ([#1732](https://github.com/tauri-apps/plugins-workspace/pull/1732) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Allow empty configuration values.
@@ -104,3 +113,6 @@
- [`eccd6f9`](https://github.com/tauri-apps/plugins-workspace/commit/eccd6f977af7629255b6f5a5205666c9079a86ed)([#504](https://github.com/tauri-apps/plugins-workspace/pull/504)) Initial release.
commit/eccd6f977af7629255b6f5a5205666c9079a86ed)([#504](https://github.com/tauri-apps/plugins-workspace/pull/504)) Initial release.
ithub.com/tauri-apps/plugins-workspace/pull/504)) Initial release.
]\(https://github.com/tauri-apps/plugins-workspace/commit/eccd6f977af7629255b6f5a5205666c9079a86ed)([#504](https://github.com/tauri-apps/plugins-workspace/pull/504)) Initial release.
commit/eccd6f977af7629255b6f5a5205666c9079a86ed)([#504](https://github.com/tauri-apps/plugins-workspace/pull/504)) Initial release.
ithub.com/tauri-apps/plugins-workspace/pull/504)) Initial release.
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-deep-link"
version = "2.0.0-rc.3"
version = "2.0.0-rc.5"
description = "Set your Tauri application as the default handler for an URL"
authors = { workspace = true }
license = { workspace = true }
+1 -1
View File
@@ -145,7 +145,7 @@ await onOpenUrl((urls) => {
})
```
Note that the Plugin will only emit events on macOS, iOS and Android. On Windows and Linux the OS will spawn a new instance of your app with the URL as a CLI argument. If you want your app to behave on Windows & Linux similar to the other platforms you can use the [single-instance](../single-instance/) plugin.
Note that the Plugin will only emit events on macOS, iOS and Android. On Windows and Linux the OS will spawn a new instance of your app with the URL as a CLI argument. If you want your app to behave on Windows & Linux similar to the other platforms you can use the [single-instance](../single-instance/) plugin with the `deep-link` feature enabled.
## Contributing
@@ -21,3 +21,5 @@ dist-ssr
*.njsproj
*.sln
*.sw?
dist/
@@ -1,5 +1,11 @@
# Changelog
## \[2.0.0-rc.1]
### Dependencies
- Upgraded to `deep-link-js@2.0.0-rc.2`
## \[2.0.0-rc.0]
### Dependencies
+3 -3
View File
@@ -1,7 +1,7 @@
{
"name": "deep-link-example",
"private": true,
"version": "2.0.0-rc.0",
"version": "2.0.0-rc.1",
"type": "module",
"scripts": {
"dev": "vite",
@@ -11,10 +11,10 @@
},
"dependencies": {
"@tauri-apps/api": "2.0.0-rc.4",
"@tauri-apps/plugin-deep-link": "2.0.0-rc.1"
"@tauri-apps/plugin-deep-link": "2.0.0-rc.2"
},
"devDependencies": {
"@tauri-apps/cli": "2.0.0-rc.11",
"@tauri-apps/cli": "2.0.0-rc.13",
"typescript": "^5.2.2",
"vite": "^5.0.13"
}
@@ -22,6 +22,9 @@ serde_json = { workspace = true }
tauri = { workspace = true, features = ["wry", "compression"] }
tauri-plugin-deep-link = { path = "../../../" }
tauri-plugin-log = { path = "../../../../log" }
tauri-plugin-single-instance = { path = "../../../../single-instance", features = [
"deep-link",
] }
log = "0.4"
[features]
@@ -41,15 +41,6 @@
<data android:host="tauri.app" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:scheme="https" />
<data android:host="91f4-177-23-156-161.ngrok-free.app" />
<data android:pathPrefix="/open" />
</intent-filter>
<!-- DEEP LINK PLUGIN. AUTO-GENERATED. DO NOT REMOVE. -->
</activity>
@@ -17,7 +17,7 @@
<key>CFBundleShortVersionString</key>
<string>0.0.0</string>
<key>CFBundleVersion</key>
<string>0.0.0</string>
<string>0.1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
@@ -6,7 +6,6 @@
<array>
<string>applinks:fabianlars.de</string>
<string>applinks:tauri.app</string>
<string>applinks:91f4-177-23-156-161.ngrok-free.app</string>
</array>
</dict>
</plist>
@@ -7,12 +7,22 @@ use tauri::Listener;
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
#[tauri::command]
fn greet(name: &str) -> String {
format!("Hello, {}! You've been greeted from Rust!", name)
format!("Hello, {name}! You've been greeted from Rust!")
}
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
#[allow(unused_mut)]
let mut builder = tauri::Builder::default();
#[cfg(desktop)]
{
builder = builder.plugin(tauri_plugin_single_instance::init(|_app, argv, _cwd| {
println!("single instance triggered: {argv:?}");
}));
}
builder
.plugin(tauri_plugin_deep_link::init())
.plugin(
tauri_plugin_log::Builder::default()
@@ -20,6 +30,16 @@ pub fn run() {
.build(),
)
.setup(|app| {
// ensure deep links are registered on the system
// this is useful because AppImages requires additional setup to be available in the system
// and calling register() makes the deep links immediately available - without any user input
#[cfg(target_os = "linux")]
{
use tauri_plugin_deep_link::DeepLinkExt;
app.deep_link().register_all()?;
}
app.listen("deep-link://new-url", |url| {
dbg!(url);
});
@@ -29,8 +29,13 @@
},
"deep-link": {
"mobile": [
{ "host": "fabianlars.de", "pathPrefix": ["/intent"] },
{ "host": "tauri.app" }
{
"host": "fabianlars.de",
"pathPrefix": ["/intent"]
},
{
"host": "tauri.app"
}
],
"desktop": {
"schemes": ["fabianlars", "my-tauri-app"]
+3 -1
View File
@@ -14,7 +14,9 @@ import { type UnlistenFn, listen } from '@tauri-apps/api/event'
* const urls = await getCurrent();
* ```
*
* #### - **Windows / Linux**: Unsupported.
* #### - **Windows / Linux**: This function reads the command line arguments and checks if there's only one value, which must be an URL with scheme matching one of the configured values.
* Note that you must manually check the arguments when registering deep link schemes dynamically with [`Self::register`].
* Additionally, the deep link might have been provided as a CLI argument so you should check if its format matches what you expect..
*
* @since 2.0.0
*/
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/plugin-deep-link",
"version": "2.0.0-rc.1",
"version": "2.0.0-rc.2",
"description": "Set your Tauri application as the default handler for an URL",
"license": "MIT or APACHE-2.0",
"authors": [
+26 -3
View File
@@ -7,7 +7,7 @@
use serde::{Deserialize, Deserializer};
use tauri_utils::config::DeepLinkProtocol;
#[derive(Deserialize)]
#[derive(Deserialize, Clone)]
pub struct AssociatedDomain {
#[serde(deserialize_with = "deserialize_associated_host")]
pub host: String,
@@ -29,7 +29,7 @@ where
}
}
#[derive(Deserialize)]
#[derive(Deserialize, Clone)]
pub struct Config {
/// Mobile requires `https://<host>` urls.
#[serde(default)]
@@ -41,7 +41,7 @@ pub struct Config {
pub desktop: DesktopProtocol,
}
#[derive(Deserialize)]
#[derive(Deserialize, Clone)]
#[serde(untagged)]
#[allow(unused)] // Used in tauri-bundler
pub enum DesktopProtocol {
@@ -54,3 +54,26 @@ impl Default for DesktopProtocol {
Self::List(Vec::new())
}
}
impl DesktopProtocol {
#[allow(dead_code)]
pub fn contains_scheme(&self, scheme: &String) -> bool {
match self {
Self::One(protocol) => protocol.schemes.contains(scheme),
Self::List(protocols) => protocols
.iter()
.any(|protocol| protocol.schemes.contains(scheme)),
}
}
#[allow(dead_code)]
pub fn schemes(&self) -> Vec<String> {
match self {
Self::One(protocol) => protocol.schemes.clone(),
Self::List(protocols) => protocols
.iter()
.flat_map(|protocol| protocol.schemes.clone())
.collect(),
}
}
}
+83 -13
View File
@@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
use serde::de::DeserializeOwned;
use tauri::{
plugin::{Builder, PluginApi, TauriPlugin},
AppHandle, Manager, Runtime,
@@ -17,12 +16,14 @@ pub use error::{Error, Result};
#[cfg(target_os = "android")]
const PLUGIN_IDENTIFIER: &str = "app.tauri.deep_link";
fn init_deep_link<R: Runtime, C: DeserializeOwned>(
fn init_deep_link<R: Runtime>(
app: &AppHandle<R>,
_api: PluginApi<R, C>,
api: PluginApi<R, Option<config::Config>>,
) -> crate::Result<DeepLink<R>> {
#[cfg(target_os = "android")]
{
let _api = api;
use tauri::{
ipc::{Channel, InvokeResponseBody},
Emitter,
@@ -59,11 +60,25 @@ fn init_deep_link<R: Runtime, C: DeserializeOwned>(
return Ok(DeepLink(handle));
}
#[cfg(not(target_os = "android"))]
Ok(DeepLink {
#[cfg(target_os = "ios")]
return Ok(DeepLink {
app: app.clone(),
current: Default::default(),
})
config: api.config().clone(),
});
#[cfg(desktop)]
{
let args = std::env::args();
let deep_link = DeepLink {
app: app.clone(),
current: Default::default(),
config: api.config().clone(),
};
deep_link.handle_cli_arguments(args);
Ok(deep_link)
}
}
#[cfg(target_os = "android")]
@@ -93,7 +108,9 @@ mod imp {
///
/// ## Platform-specific:
///
/// - **Windows / Linux**: Unsupported, will return [`Error::UnsupportedPlatform`](`crate::Error::UnsupportedPlatform`).
/// - **Windows / Linux**: This function reads the command line arguments and checks if there's only one value, which must be an URL with scheme matching one of the configured values.
/// Note that you must manually check the arguments when registering deep link schemes dynamically with [`Self::register`].
/// Additionally, the deep link might have been provided as a CLI argument so you should check if its format matches what you expect.
pub fn get_current(&self) -> crate::Result<Option<Vec<url::Url>>> {
self.0
.run_mobile_plugin::<GetCurrentResponse>("getCurrent", ())
@@ -154,23 +171,76 @@ mod imp {
/// Access to the deep-link APIs.
pub struct DeepLink<R: Runtime> {
#[allow(dead_code)]
pub(crate) app: AppHandle<R>,
#[allow(dead_code)]
pub(crate) current: Mutex<Option<Vec<url::Url>>>,
pub(crate) config: Option<crate::config::Config>,
}
impl<R: Runtime> DeepLink<R> {
/// Checks if the provided list of arguments (which should match [`std::env::args`])
/// contains a deep link argument (for Linux and Windows).
///
/// On Linux and Windows the deep links trigger a new app instance with the deep link URL as its only argument.
///
/// This function does what it can to verify if the argument is actually a deep link, though it could also be a regular CLI argument.
/// To enhance its checks, we only match deep links against the schemes defined in the Tauri configuration
/// i.e. dynamic schemes WON'T be processed.
///
/// This function updates the [`Self::get_current`] value and emits a `deep-link://new-url` event.
#[cfg(desktop)]
pub fn handle_cli_arguments<S: AsRef<str>, I: Iterator<Item = S>>(&self, mut args: I) {
use tauri::Emitter;
let Some(config) = &self.config else {
return;
};
if cfg!(windows) || cfg!(target_os = "linux") {
args.next(); // bin name
let arg = args.next();
let maybe_deep_link = args.next().is_none(); // single argument
if !maybe_deep_link {
return;
}
if let Some(url) = arg.and_then(|arg| arg.as_ref().parse::<url::Url>().ok()) {
if config.desktop.contains_scheme(&url.scheme().to_string()) {
let mut current = self.current.lock().unwrap();
current.replace(vec![url.clone()]);
let _ = self.app.emit("deep-link://new-url", vec![url]);
} else if cfg!(debug_assertions) {
log::warn!("argument {url} does not match any configured deep link scheme; skipping it");
}
}
}
}
/// Get the current URLs that triggered the deep link. Use this on app load to check whether your app was started via a deep link.
///
/// ## Platform-specific:
///
/// - **Windows / Linux**: Unsupported, will return [`Error::UnsupportedPlatform`](`crate::Error::UnsupportedPlatform`).
/// - **Windows / Linux**: This function reads the command line arguments and checks if there's only one value, which must be an URL with scheme matching one of the configured values.
/// Note that you must manually check the arguments when registering deep link schemes dynamically with [`Self::register`].
/// Additionally, the deep link might have been provided as a CLI argument so you should check if its format matches what you expect.
pub fn get_current(&self) -> crate::Result<Option<Vec<url::Url>>> {
#[cfg(not(any(windows, target_os = "linux")))]
return Ok(self.current.lock().unwrap().clone());
#[cfg(any(windows, target_os = "linux"))]
Err(crate::Error::UnsupportedPlatform)
}
/// Registers all schemes defined in the configuration file.
///
/// This is useful to ensure the schemes are registered even if the user did not install the app properly
/// (e.g. an AppImage that was not properly registered with an AppImage launcher).
pub fn register_all(&self) -> crate::Result<()> {
let Some(config) = &self.config else {
return Ok(());
};
for scheme in config.desktop.schemes() {
self.register(scheme)?;
}
Ok(())
}
/// Register the app as the default handler for the specified protocol.
+8
View File
@@ -1,5 +1,13 @@
# Changelog
## \[2.0.0-rc.6]
- [`2b898f07`](https://github.com/tauri-apps/plugins-workspace/commit/2b898f078688c57309ca17962bf02e665c406514) ([#1769](https://github.com/tauri-apps/plugins-workspace/pull/1769) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Update Tauri scopes (asset protocol) when using the `open()` command to select directories.
### Dependencies
- Upgraded to `fs@2.0.0-rc.4`
## \[2.0.0-rc.5]
- [`a2fe5551`](https://github.com/tauri-apps/plugins-workspace/commit/a2fe55512f908dd11c814ce021d164f01677572a) ([#1727](https://github.com/tauri-apps/plugins-workspace/pull/1727) by [@amrbashir](https://github.com/tauri-apps/plugins-workspace/../../amrbashir)) Add utility methods on `FilePath` and `SafeFilePath` enums which are:
+2 -2
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-dialog"
version = "2.0.0-rc.5"
version = "2.0.0-rc.6"
description = "Native system dialogs for opening and saving files along with message dialogs on your Tauri application."
edition = { workspace = true }
authors = { workspace = true }
@@ -27,7 +27,7 @@ tauri = { workspace = true }
log = { workspace = true }
thiserror = { workspace = true }
url = { workspace = true }
tauri-plugin-fs = { path = "../fs", version = "2.0.0-rc.3" }
tauri-plugin-fs = { path = "../fs", version = "2.0.0-rc.4" }
[target.'cfg(target_os = "ios")'.dependencies]
tauri = { workspace = true, features = ["wry"] }
+14 -5
View File
@@ -132,14 +132,17 @@ pub(crate) async fn open<R: Runtime>(
let res = if options.directory {
#[cfg(desktop)]
{
let tauri_scope = window.state::<tauri::scope::Scopes>();
if options.multiple {
let folders = dialog_builder.blocking_pick_folders();
if let Some(folders) = &folders {
for folder in folders {
if let Ok(path) = folder.clone().into_path() {
if let Some(s) = window.try_fs_scope() {
s.allow_directory(path, options.recursive);
s.allow_directory(&path, options.recursive);
}
tauri_scope.allow_directory(&path, options.directory)?;
}
}
}
@@ -151,8 +154,9 @@ pub(crate) async fn open<R: Runtime>(
if let Some(folder) = &folder {
if let Ok(path) = folder.clone().into_path() {
if let Some(s) = window.try_fs_scope() {
s.allow_directory(path, options.recursive);
s.allow_directory(&path, options.recursive);
}
tauri_scope.allow_directory(&path, options.directory)?;
}
}
OpenResponse::Folder(folder.map(|p| p.simplified()))
@@ -161,6 +165,8 @@ pub(crate) async fn open<R: Runtime>(
#[cfg(mobile)]
return Err(crate::Error::FolderPickerNotImplemented);
} else if options.multiple {
let tauri_scope = window.state::<tauri::scope::Scopes>();
let files = dialog_builder.blocking_pick_files();
if let Some(files) = &files {
for file in files {
@@ -169,12 +175,13 @@ pub(crate) async fn open<R: Runtime>(
s.allow_file(&path);
}
window.state::<tauri::scope::Scopes>().allow_file(&path)?;
tauri_scope.allow_file(&path)?;
}
}
}
OpenResponse::Files(files.map(|files| files.into_iter().map(|f| f.simplified()).collect()))
} else {
let tauri_scope = window.state::<tauri::scope::Scopes>();
let file = dialog_builder.blocking_pick_file();
if let Some(file) = &file {
@@ -182,7 +189,7 @@ pub(crate) async fn open<R: Runtime>(
if let Some(s) = window.try_fs_scope() {
s.allow_file(&path);
}
window.state::<tauri::scope::Scopes>().allow_file(&path)?;
tauri_scope.allow_file(&path)?;
}
}
OpenResponse::File(file.map(|f| f.simplified()))
@@ -216,13 +223,15 @@ pub(crate) async fn save<R: Runtime>(
dialog_builder = dialog_builder.add_filter(filter.name, &extensions);
}
let tauri_scope = window.state::<tauri::scope::Scopes>();
let path = dialog_builder.blocking_save_file();
if let Some(p) = &path {
if let Ok(path) = p.clone().into_path() {
if let Some(s) = window.try_fs_scope() {
s.allow_file(&path);
}
window.state::<tauri::scope::Scopes>().allow_file(&path)?;
tauri_scope.allow_file(&path)?;
}
}
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.0-rc.4]
- [`9291e4d2`](https://github.com/tauri-apps/plugins-workspace/commit/9291e4d2caa31c883c71e55f2193bd8754d72f03) ([#1640](https://github.com/tauri-apps/plugins-workspace/pull/1640) by [@SRutile](https://github.com/tauri-apps/plugins-workspace/../../SRutile)) Support any UTF-8 character in the writeFile API.
## \[2.0.0-rc.3]
- [`a2fe5551`](https://github.com/tauri-apps/plugins-workspace/commit/a2fe55512f908dd11c814ce021d164f01677572a) ([#1727](https://github.com/tauri-apps/plugins-workspace/pull/1727) by [@amrbashir](https://github.com/tauri-apps/plugins-workspace/../../amrbashir)) Add utility methods on `FilePath` and `SafeFilePath` enums which are:
+2 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-fs"
version = "2.0.0-rc.3"
version = "2.0.0-rc.4"
description = "Access the file system."
authors = { workspace = true }
license = { workspace = true }
@@ -31,6 +31,7 @@ glob = "0.3"
notify = { version = "6", optional = true, features = ["serde"] }
notify-debouncer-full = { version = "0.3", optional = true }
dunce = { workspace = true }
percent-encoding = "2"
[features]
watch = ["notify", "notify-debouncer-full"]
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1015,7 +1015,7 @@ async function writeFile(
await invoke('plugin:fs|write_file', data, {
headers: {
path: path instanceof URL ? path.toString() : path,
path: encodeURIComponent(path instanceof URL ? path.toString() : path),
options: JSON.stringify(options)
}
})
+4 -3
View File
@@ -855,10 +855,11 @@ pub async fn write_file<R: Runtime>(
.get("path")
.ok_or_else(|| anyhow::anyhow!("missing file path").into())
.and_then(|p| {
p.to_str()
.map_err(|e| anyhow::anyhow!("invalid path: {e}").into())
percent_encoding::percent_decode(p.as_ref())
.decode_utf8()
.map_err(|_| anyhow::anyhow!("path is not a valid UTF-8").into())
})
.and_then(|p| SafeFilePath::from_str(p).map_err(CommandError::from))?;
.and_then(|p| SafeFilePath::from_str(&p).map_err(CommandError::from))?;
let options = request
.headers()
.get("options")
@@ -2,14 +2,14 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
import CoreLocation
import SwiftRs
import Tauri
import UIKit
import WebKit
import CoreLocation
class GetPositionArgs: Decodable {
let enableHighAccuracy: Bool?
var enableHighAccuracy: Bool?
}
class WatchPositionArgs: Decodable {
@@ -101,14 +101,14 @@ class GeolocationPlugin: Plugin, CLLocationManagerDelegate {
if CLLocationManager.locationServicesEnabled() {
// TODO: Use the authorizationStatus instance property with locationManagerDidChangeAuthorization(_:) instead.
switch CLLocationManager.authorizationStatus() {
case .notDetermined:
status = "prompt"
case .restricted, .denied:
status = "denied"
case .authorizedAlways, .authorizedWhenInUse:
status = "granted"
@unknown default:
status = "prompt"
case .notDetermined:
status = "prompt"
case .restricted, .denied:
status = "denied"
case .authorizedAlways, .authorizedWhenInUse:
status = "granted"
@unknown default:
status = "prompt"
}
} else {
invoke.reject("Location services are not enabled.")
@@ -161,16 +161,18 @@ class GeolocationPlugin: Plugin, CLLocationManagerDelegate {
}
}
public func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
public func locationManager(
_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]
) {
// Respond to all getCurrentPosition() calls.
for request in self.positionRequests {
// The capacitor plugin uses locations.first but .last should be the most current one
// and i don't see a reason to use old locations
if let location = locations.last {
let result = convertLocation(location)
request.resolve(result)
} else {
request.reject("Location service returned an empty Location array.")
// The capacitor plugin uses locations.first but .last should be the most current one
// and i don't see a reason to use old locations
if let location = locations.last {
let result = convertLocation(location)
request.resolve(result)
} else {
request.reject("Location service returned an empty Location array.")
}
}
@@ -194,7 +196,9 @@ class GeolocationPlugin: Plugin, CLLocationManagerDelegate {
}
}
public func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) {
public func locationManager(
_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus
) {
let requests = self.permissionRequests
self.permissionRequests.removeAll()
+6
View File
@@ -1,5 +1,11 @@
# Changelog
## \[2.0.0-rc.4]
### Dependencies
- Upgraded to `fs@2.0.0-rc.4`
## \[2.0.0-rc.3]
### Dependencies
+2 -2
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-http"
version = "2.0.0-rc.3"
version = "2.0.0-rc.4"
description = "Access an HTTP client written in Rust."
edition = { workspace = true }
authors = { workspace = true }
@@ -27,7 +27,7 @@ serde_json = { workspace = true }
tauri = { workspace = true }
thiserror = { workspace = true }
tokio = { version = "1", features = ["sync", "macros"] }
tauri-plugin-fs = { path = "../fs", version = "2.0.0-rc.3" }
tauri-plugin-fs = { path = "../fs", version = "2.0.0-rc.4" }
urlpattern = "0.3"
regex = "1"
http = "1"
@@ -1,9 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.NFC" />
<!-- TODO: if the app doesn't rely on nfc the uses-feature line could be removed. The app store uses this prop to decide whether or not to show the app. -->
<!-- TODO: Move that info somewhere else since users usually can't see this file. -->
<!-- Paste the following line into the AndroidManifest.xml of your project -->
<!-- See also: https://capacitorjs.com/docs/plugins/android#manifest -->
<!-- <uses-feature android:name="android.hardware.nfc" android:required="true" /> -->
</manifest>
+11 -11
View File
@@ -16,24 +16,24 @@ enum ScanKind: Decodable {
struct ScanOptions: Decodable {
let kind: ScanKind
let keepSessionAlive: Bool?
let message: String?
let successMessage: String?
var keepSessionAlive: Bool?
var message: String?
var successMessage: String?
}
struct NDEFRecord: Decodable {
let format: UInt8?
let kind: [UInt8]?
let identifier: [UInt8]?
let payload: [UInt8]?
var format: UInt8?
var kind: [UInt8]?
var identifier: [UInt8]?
var payload: [UInt8]?
}
struct WriteOptions: Decodable {
let kind: ScanKind?
var kind: ScanKind?
let records: [NDEFRecord]
let message: String?
let successMessage: String?
let successfulReadMessage: String?
var message: String?
var successMessage: String?
var successfulReadMessage: String?
}
enum TagProcessMode {
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.0-rc.4]
- [`3d301c65`](https://github.com/tauri-apps/plugins-workspace/commit/3d301c654e6f5e7f343e0e0cbb57648002e98f04) ([#1737](https://github.com/tauri-apps/plugins-workspace/pull/1737) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) The notification body is now optional on iOS to match the other platforms.
## \[2.0.0-rc.1]
- [`e2e97db5`](https://github.com/tauri-apps/plugins-workspace/commit/e2e97db51983267f5be84d4f6f0278d58834d1f5) ([#1701](https://github.com/tauri-apps/plugins-workspace/pull/1701) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Use `PermissionState` from the `tauri` crate, which now also includes a "prompt with rationale" variant for Android (returned when your app must explain to the user why it needs the permission).
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-notification"
version = "2.0.0-rc.3"
version = "2.0.0-rc.4"
description = "Send desktop and mobile notifications on your Tauri application."
edition = { workspace = true }
authors = { workspace = true }
@@ -32,9 +32,11 @@ func makeNotificationContent(_ notification: Notification) throws -> UNNotificat
let content = UNMutableNotificationContent()
content.title = NSString.localizedUserNotificationString(
forKey: notification.title, arguments: nil)
content.body = NSString.localizedUserNotificationString(
forKey: notification.body,
arguments: nil)
if let body = notification.body {
content.body = NSString.localizedUserNotificationString(
forKey: body,
arguments: nil)
}
content.userInfo = [
"__EXTRA__": notification.extra as Any,
@@ -34,7 +34,7 @@ public class NotificationHandler: NSObject, NotificationHandlerProtocol {
try? self.plugin?.trigger("notification", data: notificationData)
if let options = notificationsMap[notification.request.identifier] {
if options.silent {
if options.silent ?? false {
return UNNotificationPresentationOptions.init(rawValue: 0)
}
}
@@ -34,13 +34,13 @@ enum ScheduleEveryKind: String, Decodable {
}
struct ScheduleInterval: Decodable {
let year: Int?
let month: Int?
let day: Int?
let weekday: Int?
let hour: Int?
let minute: Int?
let second: Int?
var year: Int?
var month: Int?
var day: Int?
var weekday: Int?
var hour: Int?
var minute: Int?
var second: Int?
}
enum NotificationSchedule: Decodable {
@@ -65,15 +65,15 @@ struct NotificationAttachment: Codable {
struct Notification: Decodable {
let id: Int
var title: String
var body: String
var body: String?
var extra: [String: String]?
let schedule: NotificationSchedule?
let attachments: [NotificationAttachment]?
let sound: String?
let group: String?
let actionTypeId: String?
let summary: String?
var silent = false
var schedule: NotificationSchedule?
var attachments: [NotificationAttachment]?
var sound: String?
var group: String?
var actionTypeId: String?
var summary: String?
var silent: Bool?
}
struct RemoveActiveNotification: Decodable {
@@ -130,19 +130,19 @@ struct Action: Decodable {
var foreground: Bool?
var destructive: Bool?
var input: Bool?
let inputButtonTitle: String?
let inputPlaceholder: String?
var inputButtonTitle: String?
var inputPlaceholder: String?
}
struct ActionType: Decodable {
let id: String
let actions: [Action]
let hiddenPreviewsBodyPlaceholder: String?
var hiddenPreviewsBodyPlaceholder: String?
var customDismissAction: Bool?
var allowInCarPlay: Bool?
var hiddenPreviewsShowTitle: Bool?
var hiddenPreviewsShowSubtitle: Bool?
let hiddenBodyPlaceholder: String?
var hiddenBodyPlaceholder: String?
}
struct RegisterActionTypesArgs: Decodable {
+6
View File
@@ -1,5 +1,11 @@
# Changelog
## \[2.0.0-rc.4]
### Dependencies
- Upgraded to `fs@2.0.0-rc.4`
## \[2.0.0-rc.3]
### Dependencies
+2 -2
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-persisted-scope"
version = "2.0.0-rc.3"
version = "2.0.0-rc.4"
description = "Save filesystem and asset scopes and restore them when the app is reopened."
authors = { workspace = true }
license = { workspace = true }
@@ -20,7 +20,7 @@ log = { workspace = true }
thiserror = { workspace = true }
aho-corasick = "1"
bincode = "1"
tauri-plugin-fs = { path = "../fs", version = "2.0.0-rc.3" }
tauri-plugin-fs = { path = "../fs", version = "2.0.0-rc.4" }
[features]
protocol-asset = ["tauri/protocol-asset"]
+16
View File
@@ -1,5 +1,21 @@
# Changelog
## \[2.0.0-rc.3]
- [`b2269333`](https://github.com/tauri-apps/plugins-workspace/commit/b2269333e39afe32629a11763a8e25d0b12b132b) ([#1766](https://github.com/tauri-apps/plugins-workspace/pull/1766) by [@Legend-Master](https://github.com/tauri-apps/plugins-workspace/../../Legend-Master)) Put deep link integration behined a feature
### Dependencies
- Upgraded to `deep-link@2.0.0-rc.5`
## \[2.0.0-rc.2]
- [`64a6240f`](https://github.com/tauri-apps/plugins-workspace/commit/64a6240f79fcd52267c8d721b727ae695055d7ff) ([#1759](https://github.com/tauri-apps/plugins-workspace/pull/1759) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Integrate with the deep link plugin out of the box.
### Dependencies
- Upgraded to `deep-link@2.0.0-rc.4`
## \[2.0.0-rc.1]
- [`3c52f30e`](https://github.com/tauri-apps/plugins-workspace/commit/3c52f30ea4ec29c51f7021aa7871614d72e43258) ([#1665](https://github.com/tauri-apps/plugins-workspace/pull/1665) by [@amrbashir](https://github.com/tauri-apps/plugins-workspace/../../amrbashir)) Updated `windows-sys` crate to `0.59`
+3 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-single-instance"
version = "2.0.0-rc.1"
version = "2.0.0-rc.3"
description = "Ensure a single instance of your tauri app is running."
authors = { workspace = true }
license = { workspace = true }
@@ -19,6 +19,7 @@ serde_json = { workspace = true }
tauri = { workspace = true }
log = { workspace = true }
thiserror = { workspace = true }
tauri-plugin-deep-link = { path = "../deep-link", version = "2.0.0-rc.5", optional = true }
semver = { version = "1", optional = true }
[target."cfg(target_os = \"windows\")".dependencies.windows-sys]
@@ -38,3 +39,4 @@ zbus = "4"
[features]
semver = ["dep:semver"]
deep-link = ["dep:tauri-plugin-deep-link"]
+4 -2
View File
@@ -34,8 +34,8 @@ use tauri::{Manager};
#[derive(Clone, serde::Serialize)]
struct Payload {
args: Vec<String>,
cwd: String,
args: Vec<String>,
cwd: String,
}
fn main() {
@@ -49,6 +49,8 @@ fn main() {
}
```
Note that currently, plugins run in the order they were added in to the builder, so make sure that this plugin is registered first.
## Contributing
PRs accepted. Please make sure to read the Contributing Guide before making a pull request.
@@ -9,6 +9,6 @@
"author": "",
"license": "MIT",
"devDependencies": {
"@tauri-apps/cli": "2.0.0-rc.11"
"@tauri-apps/cli": "2.0.0-rc.13"
}
}
+8 -2
View File
@@ -31,9 +31,15 @@ pub(crate) type SingleInstanceCallback<R> =
dyn FnMut(&AppHandle<R>, Vec<String>, String) + Send + Sync + 'static;
pub fn init<R: Runtime, F: FnMut(&AppHandle<R>, Vec<String>, String) + Send + Sync + 'static>(
f: F,
mut f: F,
) -> TauriPlugin<R> {
platform_impl::init(Box::new(f))
platform_impl::init(Box::new(move |app, args, cwd| {
#[cfg(feature = "deep-link")]
if let Some(deep_link) = app.try_state::<tauri_plugin_deep_link::DeepLink<R>>() {
deep_link.handle_cli_arguments(args.iter());
}
f(app, args, cwd)
}))
}
pub fn destroy<R: Runtime, M: Manager<R>>(manager: &M) {
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.0-rc.2]
- [`0dd97d91`](https://github.com/tauri-apps/plugins-workspace/commit/0dd97d911569cdedab07f504b708036d62ff83c1) ([#1375](https://github.com/tauri-apps/plugins-workspace/pull/1375) by [@KauanCurbani](https://github.com/tauri-apps/plugins-workspace/../../KauanCurbani)) Added support for `UUID` columns to the postgres implementation.
## \[2.0.0-rc.1]
- [`e2e97db5`](https://github.com/tauri-apps/plugins-workspace/commit/e2e97db51983267f5be84d4f6f0278d58834d1f5) ([#1701](https://github.com/tauri-apps/plugins-workspace/pull/1701) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Update to tauri 2.0.0-rc.8
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-sql"
version = "2.0.0-rc.1"
version = "2.0.0-rc.2"
description = "Interface with SQL databases."
authors = { workspace = true }
license = { workspace = true }
+1 -1
View File
@@ -14,7 +14,7 @@ pub(crate) fn to_json(v: PgValueRef) -> Result<JsonValue, Error> {
}
let res = match v.type_info().name() {
"CHAR" | "VARCHAR" | "TEXT" | "NAME" => {
"CHAR" | "VARCHAR" | "TEXT" | "NAME" | "UUID" => {
if let Ok(v) = ValueRef::to_owned(&v).try_decode() {
JsonValue::String(v)
} else {
@@ -8,7 +8,7 @@
"tauri": "tauri"
},
"devDependencies": {
"@tauri-apps/cli": "2.0.0-rc.11",
"@tauri-apps/cli": "2.0.0-rc.13",
"vite": "^5.0.12",
"typescript": "^5.3.3"
}
@@ -9,7 +9,7 @@
"preview": "vite preview"
},
"devDependencies": {
"@tauri-apps/cli": "2.0.0-rc.11",
"@tauri-apps/cli": "2.0.0-rc.13",
"typescript": "^5.3.3",
"vite": "^5.0.13"
},
+711 -771
View File
File diff suppressed because it is too large Load Diff
@@ -8,7 +8,7 @@ import UIKit
import WebKit
class PingArgs: Decodable {
let value: String?
var value: String?
}
class ExamplePlugin: Plugin {