app
Ce contenu n’est pas encore disponible dans votre langue.
Enumerations
Section titled “Enumerations”BundleType
Section titled “BundleType”Bundle type of the current application.
Enumeration Members
Section titled “Enumeration Members”App: "app";macOS app bundle
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L48
AppImage
Section titled “AppImage”AppImage: "appimage";Linux AppImage
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L46
Deb: "deb";Linux Debian package
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L42
Msi: "msi";Windows MSI
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L40
Nsis: "nsis";Windows NSIS
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L38
Rpm: "rpm";Linux RPM
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L44
Type Aliases
Section titled “Type Aliases”DataStoreIdentifier
Section titled “DataStoreIdentifier”type DataStoreIdentifier: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number];Identifier type used for data stores on macOS and iOS.
Represents a 128-bit identifier, commonly expressed as a 16-byte UUID.
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L14
OnBackButtonPressPayload
Section titled “OnBackButtonPressPayload”type OnBackButtonPressPayload: object;Payload for the onBackButtonPress event.
Type declaration
Section titled “Type declaration”| Name | Type | Description | Defined in |
|---|---|---|---|
canGoBack | boolean | Whether the webview canGoBack property is true. | Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L260 |
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L258
Functions
Section titled “Functions”defaultWindowIcon()
Section titled “defaultWindowIcon()”function defaultWindowIcon(): Promise<Image | null>Gets the default window icon.
Returns
Section titled “Returns”Example
Section titled “Example”import { defaultWindowIcon } from '@tauri-apps/api/app';const icon = await defaultWindowIcon();2.0.0
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L197
fetchDataStoreIdentifiers()
Section titled “fetchDataStoreIdentifiers()”function fetchDataStoreIdentifiers(): Promise<DataStoreIdentifier[]>Fetches the data store identifiers on macOS and iOS.
See https://developer.apple.com/documentation/webkit/wkwebsitedatastore for more information.
Returns
Section titled “Returns”Promise<DataStoreIdentifier[]>
Example
Section titled “Example”import { fetchDataStoreIdentifiers } from '@tauri-apps/api/app';const ids = await fetchDataStoreIdentifiers();2.4.0
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L160
getBundleType()
Section titled “getBundleType()”function getBundleType(): Promise<BundleType>Gets the application bundle type.
Returns
Section titled “Returns”Example
Section titled “Example”import { getBundleType } from '@tauri-apps/api/app';const type = await getBundleType();2.5.0
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L251
getIdentifier()
Section titled “getIdentifier()”function getIdentifier(): Promise<string>Gets the application identifier.
Returns
Section titled “Returns”Promise<string>
The application identifier as configured in tauri.conf.json.
Example
Section titled “Example”import { getIdentifier } from '@tauri-apps/api/app';const identifier = await getIdentifier();2.4.0
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L112
getName()
Section titled “getName()”function getName(): Promise<string>Gets the application name.
Returns
Section titled “Returns”Promise<string>
Example
Section titled “Example”import { getName } from '@tauri-apps/api/app';const appName = await getName();1.0.0
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L81
getTauriVersion()
Section titled “getTauriVersion()”function getTauriVersion(): Promise<string>Gets the Tauri framework version used by this application.
Returns
Section titled “Returns”Promise<string>
Example
Section titled “Example”import { getTauriVersion } from '@tauri-apps/api/app';const tauriVersion = await getTauriVersion();1.0.0
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L96
getVersion()
Section titled “getVersion()”function getVersion(): Promise<string>Gets the application version.
Returns
Section titled “Returns”Promise<string>
Example
Section titled “Example”import { getVersion } from '@tauri-apps/api/app';const appVersion = await getVersion();1.0.0
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L67
hide()
Section titled “hide()”function hide(): Promise<void>Hides the application on macOS.
Returns
Section titled “Returns”Promise<void>
Example
Section titled “Example”import { hide } from '@tauri-apps/api/app';await hide();1.2.0
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L143
onBackButtonPress()
Section titled “onBackButtonPress()”function onBackButtonPress(handler): Promise<PluginListener>Listens to the backButton event on Android.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
handler | (payload) => void |
Returns
Section titled “Returns”Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L267
removeDataStore()
Section titled “removeDataStore()”function removeDataStore(uuid): Promise<void>Removes the data store with the given identifier.
Note that any webview using this data store should be closed before running this API.
See https://developer.apple.com/documentation/webkit/wkwebsitedatastore for more information.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
uuid | DataStoreIdentifier |
Returns
Section titled “Returns”Promise<void>
Example
Section titled “Example”import { fetchDataStoreIdentifiers, removeDataStore } from '@tauri-apps/api/app';for (const id of (await fetchDataStoreIdentifiers())) { await removeDataStore(id);}2.4.0
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L181
setDockVisibility()
Section titled “setDockVisibility()”function setDockVisibility(visible): Promise<void>Sets the dock visibility for the application on macOS.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
visible | boolean | Whether the dock should be visible or not. |
Returns
Section titled “Returns”Promise<void>
Example
Section titled “Example”import { setDockVisibility } from '@tauri-apps/api/app';await setDockVisibility(false);2.5.0
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L236
setTheme()
Section titled “setTheme()”function setTheme(theme?): Promise<void>Sets the application’s theme. Pass in null or undefined to follow
the system theme.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
theme? | null | Theme |
Returns
Section titled “Returns”Promise<void>
Example
Section titled “Example”import { setTheme } from '@tauri-apps/api/app';await setTheme('dark');Platform-specific
- iOS / Android: Unsupported.
2.0.0
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L219
show()
Section titled “show()”function show(): Promise<void>Shows the application on macOS. This function does not automatically focus any specific app window.
Returns
Section titled “Returns”Promise<void>
Example
Section titled “Example”import { show } from '@tauri-apps/api/app';await show();1.2.0
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L128
supportsMultipleWindows()
Section titled “supportsMultipleWindows()”function supportsMultipleWindows(): Promise<boolean>Returns
Section titled “Returns”Promise<boolean>
Source: https://github.com/tauri-apps/tauri/blob/dev/packages/api/src/app.ts#L277
© 2026 Tauri Contributors. CC-BY / MIT