Upgrade from Tauri 2.0 Beta
Esta página aún no está disponible en tu idioma.
This guide walks you through upgrading your Tauri 2.0 beta application to Tauri 2.0 release candidate.
Automated Migration
The Tauri v2 CLI includes a migrate
command that automates most of the process and helps you finish the migration:
Learn more about the migrate
command in the Command Line Interface reference
Breaking Changes
We have had several breaking changes going from beta to release candidate. These can be either auto-migrated (see above) or manually performed.
Tauri Core Plugins
We changed how Tauri built-in plugins are addressed in the capabilities PR #10390.
To migrate from the latest beta version you need to prepend all core permission identifiers in your capabilities with core:
or switch to the core:default
permission and remove old core plugin identifiers.
We also added a new special core:default
permission set which will contain all default permissions of all core plugins, so you can simplify the permissions boilerplate in your capabilities config.
Built-In Development Server
We introduced changes to the network exposure of the built-in development server PR #10437 and PR #10456.
The built-in mobile development server no longer exposes network wide and tunnels traffic from the local machine directly to the device.
Currently this improvement does not automatically apply when running on iOS devices (either directly or from Xcode).
In this case we default to using the public network address for the development server,
but there’s a way around it which involves opening Xcode to automatically start a connection between your macOS machine and your connected iOS device,
then running tauri ios dev --force-ip-prompt
to select the iOS device’s TUN address (ends with ::2).
Your development server configuration needs to adapt to this change if running on a physical iOS device is intended.
Previously we recommended checking if the TAURI_ENV_PLATFORM
environment variable matches either android
or ios
,
but since we can now connect to localhost unless using an iOS device, you should instead check the TAURI_DEV_HOST
environment variable.
Here’s an example of a Vite configuration migration:
- 2.0.0-beta:
- 2.0.0:
© 2024 Tauri Contributors. CC-BY / MIT