* Fix Tauri iOS build not having a PATH variable to access unzip to extract binaryTargets and also not including Frameworks when linking
* Add covector change
* fmt
* Update crates/tauri-utils/src/build.rs
Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
---------
Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
* feat(cli): check plugin versions for incompatibilities
check core plugin versions for incompatibilities between Cargo and NPM releases
a plugin NPM/cargo version is considered "incompatible" if their major or minor versions are not equal
on dev we show an warning
on build we error out (with a `--ignore-incompatible-plugins` flag to prevent that)
this is an idea from @oscartbeaumont
we've seen several plugin changes that require updates for both the cargo and the NPM releases of a plugin, and if they are not in sync, the functionality does not work
e.g. https://github.com/tauri-apps/plugins-workspace/pull/2573 where the change actually breaks the app updater if you miss the NPM update
* Use list to get multiple package versions at once
* Fix for older rust versions
* Clippy
* Support yarn classic
* Support yarn berry
* Use `.cmd` only for `npm`, `yarn`, `pnpm`
* Use yarn list without --pattern
* rename
* Extract function `check_incompatible_packages`
* Check `tauri` <-> `@tauri-apps/api`
* incompatible -> mismatched
* run build check in parallel
* rename struct
* Switch back to use sync check and add todo
* Extract to function `cargo_manifest_and_lock`
---------
Co-authored-by: Tony <legendmastertony@gmail.com>
* fix: a few regressions from previous PRs
* rename with_window_features to window_features
* Clippy
* clippy
---------
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* Adds the ability to set the focused property from tauri.conf.json -- windows
* add set_focusable, pin tao
* fmt
---------
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* add "new window" and "document title changed" webview handler
* take document title changed handler
* update example, add missing api, change files
* allow creating tauri window for the window.open call
* set size and position, fix linux, example
* enhance document title change
* fix windows deadlock
* wry 0.53
* update wry
---------
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* feat: add `--root-certificate-path` option for mobile dev
lets you use a HTTPS development server
example usage:
```
cargo install tauri-cli --git https://github.com/tauri-apps/tauri --branch feat/mobile-dev-cert
cargo tauri android dev --open --root-certificate-path "/Users/lucas/Library/Application Support/mkcert/rootCA.pem" --features tauri/rustls-tls
```
* Apply suggestions from code review
Co-authored-by: Fabian-Lars <github@fabianlars.de>
---------
Co-authored-by: Fabian-Lars <github@fabianlars.de>
* feat: add option to not wait on notarization to finish
* cli arg istead of config
* changefile
* fix serde
---------
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* fix: double free of resizing handler's userdata on Windows
Using WM_NCDESTROY instead of WM_DESTROY is more correct for freeing userdata, as windows can receive multiple WM_DESTROY events if they're parented.
* chore: add change entry for resizing handler double-free fix
* feat(menu): add icon and nativeIcon support for Submenu in tauri and @tauri-apps/api
* Merge branch 'dev' into dev
* Update muda
* feat(menu): add set_icon and set_native_icon methods to set submenu icons
* feat(menu): unify icon handling by introducing MenuIcon type
* chore: sync bundle.global.js
* Make setIcon actually work
* Regenerate `bundle.global.js`
---------
Co-authored-by: Tony <legendmastertony@gmail.com>
* fix: update vite.config.ts to support Svelte 4 in example app
* Migrate the code to svelte 5 instead
* Add change file
---------
Co-authored-by: Tony <legendmastertony@gmail.com>
* feat: add config option for custom watch folders
* fix: cargo clippy changes
* chore: remove file
* fix: ios dev
* docs: clarify absolute allowed
* refactor: rename variable
* fix: review suggestions
* fix: resolve paths
* fixL use canonicalize
* chore: add changefile
* chore: add error if cant canonicalize
* reformat changelog
* Update .changes/additional-watch-folders.md
* Update crates/tauri-cli/src/interface/rust.rs
Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
* Revert "Update .changes/additional-watch-folders.md"
This reverts commit 98186b1a89.
* Also bump `@tauri-apps/cli`
* Apparently I'm so used to a higher rust version
* Revert "Apparently I'm so used to a higher rust version"
This reverts commit ea1d89e2d3.
* Need to check for existence for abs paths as well
---------
Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
Co-authored-by: Tony <legendmastertony@gmail.com>
* test: make some of window id + stores public
* test: make window wrapper label pub
* feat: make label accessible for windowwrapper
* chore: adds wry runtime changefile
* chore: avoid forced clone on label
Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
---------
Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
* feat(mock): add mock for listen and emit
* feat(mock): add mock for listen and emit
* feat(mock): add mock for listen and emit
* Add change file
* correctly clear unregisterListener
* format with prettier
* build project
* opt-in to mocking events
* Use a minor bump
* Update config.schema.json
* Add RunnerConfig for customizable build runner
Replaces runner String with RunnerConfig in CLI and config, allowing advanced runner configuration via string or object with cmd, cwd, and args. Updates schema and usage to support new format, and adds tests for serialization, deserialization, and API. Enables more flexible build and run command customization.
* Create runner-object-config.md
* Remove unused RunnerConfig import in tests
Cleaned up the test module in config.rs by removing the unused RunnerConfig import from two test functions.
* Fix tests failing
Updates related tests in tauri-utils to improve readability and maintain consistency. Minor import reordering in tauri-cli for clarity.
* Move RunnerConfig enum and impls above BuildConfig
Relocated the RunnerConfig enum and its associated implementations to appear before the BuildConfig definition. This improves code organization and logical grouping of configuration-related types.
currently deps are only installed on init, which might not be executed on someone's machine if the xcode project is commited to the repo. we need to ensure dependencies are installed before running them
applies https://github.com/tauri-apps/cargo-mobile2/pull/468
* patch binary with bundle type info
* only patch if the updater is included
* fix linux warnings
* patch binary when updaer is configured
* patch binary with bundle type info
only patch if the updater is included
fix linux warnings
patch binary when updaer is configured
* fix formatting
* fix license header
* fix taplo error
* move __TAURI_BUNDLE_TYPE to utils
* export get_current_bundle_type
* macos fix
* cleanup, add api
* update change file
* fix windows
* fmt, fix rust version support
* fix macos
---------
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* apply version updates
* minor bump for build, plugin, macros and runtime
---------
Co-authored-by: lucasfernog <20051258+lucasfernog@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* fix: dont depend on private schemars api
* tauri-cli/deps: update kuchikiki and html5ever
tauri-utils/deps: update kuchikiki and html5ever
tauri-runtime-wry/deps: update wry to match kuchikiki and html5ever versions
* fix: specify exact patch version of schemars
Without this, cargo resolves the patch version of schemars to one that
does not include the _private module on which tauri-utils v1 depends,
which is a dependency of tauri-cli. As a result of this, the build breaks.
* tauri-utils/fix: inline tauri-utils v1 config module
* deps: upgrade and pin schemars 0.8.21 to pick up crate patch in Cargo.toml
* update tao, wry
* lint, license
* lint
---------
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* fix(cli): read original identifier to fix mobile options reading
the iOS and Android CLI commands leverage an android_studio_script/xcode_script that is executed by the native IDE or build tool. This script reads the Tauri configuration to find the app identifier used to communicate with the parent Tauri CLI process to read CLI options.
The communication is broken when the `--config` arg is used, since the IDE script does not have access to that value before reaching the parent process, which is impossible without knowing the actual identifier used.
To bypass this we'll agree on using the original identifier. This obviously won't work if the original tauri.conf.json do not have an identifier, so we error out in this case
* fix build, lint
* Dynamic dispatch async commands
* format
* Preserve `'static`
* Use a inner function instead
* Only do it for dev for now
* Add change file
* Tag respond_async_serialized_dyn with debug
* fix(core): capability filtering crashing allowed command generation
tauri-plugin and tauri build scripts cannot have access to the capabilities file (generated by tauri-build) and can only infer capabilities from the config path
* cleanup
* unused import
* followup
* fix reassign
* mut
* Update crates/tauri-utils/src/acl/build.rs
Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
---------
Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
* refactor: put dynamic acl to a feature
* Add change file
* Tweak remove_unused_commands's docs
* License header
* Document the feature
* Merge remote-tracking branch 'upstream/dev' into dynamic-acl-feature
* Use a inner non generic fn for add_capability
* Clippy and macro stability notice
* Merge remote-tracking branch 'upstream/dev' into dynamic-acl-feature
* Format
* fix(core): immediately unregister event listener on unlisten call
the unlisten function is currently async, but marked as `() => void` in the TypeScript definition. To avoid a breaking change, we're going to immediately unregister the listener function so it's not called.
this fixes a race condition where after calling unlisten() you would still receive events if you do not `await` it and there's a new event triggering while the unlisten command is running
* cleanup
* fix build
* fix ci
* Update docs for WebviewWindowBuilder::from_config
The documentation for `WebviewWindowBuilder::from_config` mentions changing the label of the new `WebviewWindowBuilder`, which is not possible.
Instead, the label must be changed in the `WindowConfig` that is passed into `WebviewWindowBuilder::from_config`.
This change fixes that description and adds an example code snippet for this use-case.
* Add reference to function arguments so the type is correctly inferred
* Remove unnecesary reference
* fix tests
* fix doctest
---------
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* fix path joining behavior where path.join('', 'a') incorrectly returns "/a" instead of "a" (#13313)
* Clean up
---------
Co-authored-by: Tony <legendmastertony@gmail.com>
macOS uses a different coordinate system for visibleFrame, so to get accurate values we should only get the diff between frame() and visibleFrame() and apply that to the standard monitor position returned by CGDisplayBounds. Size isn't impacted by this, and properly returns the value (accounting for dock position).
* fix(core): fix TrayIcon.getById returning new resource IDs
this prevents the close() from working properly if you somehow lose the new() resource ID (for instance when the app reloads) and need to pick it up again and close it.
* cleanup on close
* Use `Headers` in `sendIpcMessage`
* Add change file
* Change files
* Don't use optional chaining
Seems like we have changed it in #9530 deliberately,
so preserving it in this change
* do not let the tauri headers to be overwritten
Co-authored-by: Sean Wang <126865849+WSH032@users.noreply.github.com>
* use HeadersInit on the type definition
---------
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
Co-authored-by: Sean Wang <126865849+WSH032@users.noreply.github.com>
* fix(webdriver): windows: make native webdriver close with parent process
* add change file
---------
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* feat(cli): enhance iOS bundle version formatting
follow-up for #13030 and https://github.com/tauri-apps/cargo-mobile2/pull/450
the bundle version validation has been updated, now it can actually handle one or two integers (e.g. `100` or `10.7`) instead of just full triple semver strings (e.g. `10.7.1`).
* lint
* Add an option for preventing window overflow
* Fix shadow counted as part of the width
* Enable prevent overflow by default
* Fix crashing when margin is bigger than screen
* Config file support
* Add to ts type
* Add mac implementation
* Should be let some
* Apply suggestions from code review
Co-authored-by: Jason Tsai <jason@pews.dev>
* checked_sub -> saturating_sub
* Revert license header
* Migrate windows 0.58
* Generate schema
* Fix merge conflict
* Try casting to objc2_app_kit::NSScreen
* Add NSScreen feature
* Use cast instead of as
* fmt
* Deref first
* Wrong unsafe block
* Add change file
* Add serde alias
* More docs
* Disable prevent_overflow by default
since we can't make breaking changes anymore right now
* Remove unused default impl
* Missing pub
* Fix mock_runtime on ios
* Match PreventOverflowMargin's description
* Typo
* Apply suggestions from code review
* Move get_work_area_size to seperate files
* Unused imports
* Add prevent_overflow to WebviewWindowBuilder
* Fix mac compile
* MonitorExt is only for desktop
* Rename to work_area
* Use workarea for linux
* Missing `()`
* Convert size
* Import MonitorExt
* as u32
* Re-build API js
* Fix wrong docs for work_area
* Remove linux platform specific note
* Remove left over linux platform specific note
* Use work area API for center as well
* Fix mobile
* Clean up
* small cleanup
* fix codegen
* update docs
* fix generated
---------
Co-authored-by: Jason Tsai <jason@pews.dev>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* fix(cli): iOS dev broken on Xcode 16.3, closes#13128
Looks like we cannot use the arm64-sim custom architecture on Xcode 16.3, as it incorrectly appends the -sim suffix on some clang build scripts which ends up with an invalid target triple.
Currently we do not have automation to update Xcode/Android projects, so a manual intervention is required by our users, either recreating the project or modifying it manually (the arm64-sim arch must be removed and all its references).
ref https://github.com/tauri-apps/cargo-mobile2/pull/445
* fix dev on macOS with intel chip
* Fix channel cb never cleaned up from `window`
* Should be `_{id}`
* Still need to manually impl clone
* Regenerate bundle.global.js
* Remove current_index from ChannelInner
* Move phantom to `Channel`
* `Channel` not `Self`
* Clean up
* Clean up
* Fix missing end quote
* Add change file
* Rename id to index to match js side
* Improve channel speed on small data
* do the same perf check for IPC responses and raw bytes
---------
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* macOS/iOS: add option to disable or enable link previews when building a webview (the webkit api has it enabled by default)
- `WebViewBuilderExtDarwin.allow_link_preview(allow_link_preview: bool)`
- `WebViewBuilder.allow_link_preview(allow_link_preview: bool)`
- `WebviewWindowBuilder.allow_link_preview(allow_link_preview: bool)`
* also call on iOS
* add api
* fix tests
---------
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* chore: fix a few internal docs
* Remove label clone
* Unused allow lint
* No way clippy just updated
* `cargo clippy --fix -- -W clippy::redundant_clone`
* format