Skip to content

app

Source: undefined

Bundle type of the current application.

App: "app";

Source: undefined

macOS app bundle

AppImage: "appimage";

Source: undefined

Linux AppImage

Deb: "deb";

Source: undefined

Linux Debian package

Msi: "msi";

Source: undefined

Windows MSI

Nsis: "nsis";

Source: undefined

Windows NSIS

Rpm: "rpm";

Source: undefined

Linux RPM

type DataStoreIdentifier = [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number];

Source: undefined

Identifier type used for data stores on macOS and iOS.

Represents a 128-bit identifier, commonly expressed as a 16-byte UUID.


type OnBackButtonPressPayload = object;

Source: undefined

Payload for the onBackButtonPress event.

Property Type Description Defined in
canGoBack boolean Whether the webview canGoBack property is true. Source: undefined

function defaultWindowIcon(): Promise<Image | null>;

Source: undefined

Gets the default window icon.

Promise<Image | null>

import { defaultWindowIcon } from '@tauri-apps/api/app';
const icon = await defaultWindowIcon();

2.0.0


function fetchDataStoreIdentifiers(): Promise<DataStoreIdentifier[]>;

Source: undefined

Fetches the data store identifiers on macOS and iOS.

See https://developer.apple.com/documentation/webkit/wkwebsitedatastore for more information.

Promise<DataStoreIdentifier[]>

import { fetchDataStoreIdentifiers } from '@tauri-apps/api/app';
const ids = await fetchDataStoreIdentifiers();

2.4.0


function getBundleType(): Promise<BundleType>;

Source: undefined

Gets the application bundle type.

Promise<BundleType>

import { getBundleType } from '@tauri-apps/api/app';
const type = await getBundleType();

2.5.0


function getIdentifier(): Promise<string>;

Source: undefined

Gets the application identifier.

Promise<string>

The application identifier as configured in tauri.conf.json.

import { getIdentifier } from '@tauri-apps/api/app';
const identifier = await getIdentifier();

2.4.0


function getName(): Promise<string>;

Source: undefined

Gets the application name.

Promise<string>

import { getName } from '@tauri-apps/api/app';
const appName = await getName();

1.0.0


function getTauriVersion(): Promise<string>;

Source: undefined

Gets the Tauri framework version used by this application.

Promise<string>

import { getTauriVersion } from '@tauri-apps/api/app';
const tauriVersion = await getTauriVersion();

1.0.0


function getVersion(): Promise<string>;

Source: undefined

Gets the application version.

Promise<string>

import { getVersion } from '@tauri-apps/api/app';
const appVersion = await getVersion();

1.0.0


function hide(): Promise<void>;

Source: undefined

Hides the application on macOS.

Promise<void>

import { hide } from '@tauri-apps/api/app';
await hide();

1.2.0


function onBackButtonPress(handler): Promise<PluginListener>;

Source: undefined

Listens to the backButton event on Android.

Parameter Type Description
handler (payload) => void -

Promise<PluginListener>


function removeDataStore(uuid): Promise<void>;

Source: undefined

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.

Parameter Type
uuid DataStoreIdentifier

Promise<void>

import { fetchDataStoreIdentifiers, removeDataStore } from '@tauri-apps/api/app';
for (const id of (await fetchDataStoreIdentifiers())) {
await removeDataStore(id);
}

2.4.0


function setDockVisibility(visible): Promise<void>;

Source: undefined

Sets the dock visibility for the application on macOS.

Parameter Type Description
visible boolean Whether the dock should be visible or not.

Promise<void>

import { setDockVisibility } from '@tauri-apps/api/app';
await setDockVisibility(false);

2.5.0


function setTheme(theme?): Promise<void>;

Source: undefined

Sets the application’s theme. Pass in null or undefined to follow the system theme.

Parameter Type
theme? Theme | null

Promise<void>

import { setTheme } from '@tauri-apps/api/app';
await setTheme('dark');

Platform-specific

  • iOS / Android: Unsupported.

2.0.0


function show(): Promise<void>;

Source: undefined

Shows the application on macOS. This function does not automatically focus any specific app window.

Promise<void>

import { show } from '@tauri-apps/api/app';
await show();

1.2.0


function supportsMultipleWindows(): Promise<boolean>;

Source: undefined

Promise<boolean>


© 2026 Tauri Contributors. CC-BY / MIT