exit

external fun exit(code: Double = definedExternally): Promise<Void>(source)

Exits the app with the given exit code.

This is the same as the exit function of the @tauri-apps/plugin-process plugin, but does not require a plugin to be installed.

Platform-specific

  • Android: The activity is finished instead of the process being killed, so the app closes with the system transition; code is ignored.

Since

2.12.0

Parameters

code

The exit code to use. Defaults to 0.