changes the CLI `add` command to match the CLI major and pre requirements for known plugins
this is required because right now adding the deep-link plugin installs the v1 plugin (latest version known by cargo as the v2 is still in RC), even though we're running the v2 CLI
* feat(core): enhance IPC permission error message
- include more information about current URL and allowed origins
- enhance formatting of the error message
* plugin not found & command not found
* lint
I noticed the plugin build fails on older Swift (tested on macOS 12) because the default minimum required macOS version (10.10 in my case) is older than `v10_13` which is set by the Tauri iOS package (and also swift-rs).
So the plugins must explicitly define a minimum macOS version too.
* fix(android): avoid rebuilds if nothing changed
Unconditionally overwriting files where the build reruns if they changed
leads to rebuilds every time.
Only overwrite a file if its content is different to not rebuild in such
a case.
* use write_if_changed utils
* use existing function
---------
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* feat(ios): add a new cli option to dev to use project archs
Add a new option to instruct cargo-mobile2 to use architectures configured in the project for building
* update cargo-mobile2, add change file
* fix change file [skip ci]
---------
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* skip pack in publish, use check fetch
* remove script
* remove apt, exists in main pipeline
* CLI doesn't need separate check
* no assets for tauri-cli
* fix(utils): fix resources map becomes directory
closes#10187
Fixes the behavior of mapped resources generating extra directory, for example:
`"../resources/user.json": "resources/user.json"` generates this resource `resources/user.json/user.json`
where it should generate `resources/user.json`
This PR includes a refactor of the Iterator implementation which splits it into more scoped functions and relis on recursing instead of a loop which makes the code a lot more readable and easier to maintain.
* clippy
* cover more cases
* clippy
* fix glob into directory, not resolving target correctly
* return error when resource origin path doesn't exist
* fix resources example build
* Update .changes/resources-map-becoming-dirs.md
---------
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
* refactor(core): serialize response once closes#5641
This change impacts both the custom protocol and the postMessage based IPC implementations. Basically it changes the whole IPC mechanism to work on raw JSON strings so we do not need to serialize a serde_json::Value after serializing to it from a user-provided type.
i benchmarked this with a 150MB file response (returning Vec<u8> instead of tauri::ipc::Response since the latter does not serialize at all) and it went from 29s to 23s (custom protocol) and from 54s to 48s (post message) on macOS.
* fix mobile & lint
* clippy
immediately after merging #10588 I noticed that the variable name might be a bit ambigious and could cause confusion on other pl atforms other than Windows