Files
tauri/examples
Lucas Fernandes Nogueira 26d243f43a fix(core): restart cannot handle binary name change on macOS (#10991)
* fix(core): `restart` cannot handle binary name change on macOS

Tauri v2 changed the default binary name of the bundled apps (no longer follows the productName, just uses the default name from Cargo instead). This breaks the `restart` function, which expects the current binary path to match the new one.

Due to this change, the restart() function for macOS is broken - the .app is correctly replaced even if the productName changed, but the restart() function cannot handle the new binary path. This change adds a simple check on macOS to read the `Contents/MacOS` folder and if it only contains a single binary, we use it to restart instead.
This inference cannot be used if there's sidecars, so in this case we just let the existing implementation run and if it fails to restart, we do not panic but only warn and exit instead.

AppImage updates are not affected by this, and the Windows installer is responsible for restarting, so this change is only applied to macOS binaries.

* fix: use Info.plist to determine binary name

* use log instead of eprintln

* move log
2024-09-14 10:51:29 -03:00
..

Examples

Following directories contain examples of tauri app functionality.

There are different execution steps depending on the example. See each directory README.md for execution method.