app
Functions
defaultWindowIcon()
Get the default window icon.
Returns
Example
Since
2.0.0
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L99
getName()
Gets the application name.
Returns
Promise
<string
>
Example
Since
1.0.0
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L39
getTauriVersion()
Gets the Tauri version.
Returns
Promise
<string
>
Example
Since
1.0.0
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L54
getVersion()
Gets the application version.
Returns
Promise
<string
>
Example
Since
1.0.0
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L25
hide()
Hides the application on macOS.
Returns
Promise
<void
>
Example
Since
1.2.0
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L84
setTheme()
Set app’s theme, pass in null
or undefined
to follow system theme
Parameters
Parameter | Type |
---|---|
theme ? | null | Theme |
Returns
Promise
<void
>
Example
Platform-specific
- iOS / Android: Unsupported.
Since
2.0.0
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L120
show()
Shows the application on macOS. This function does not automatically focus any specific app window.
Returns
Promise
<void
>
Example
Since
1.2.0
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L69
© 2024 Tauri Contributors. CC-BY / MIT