Skip to content

CapacitorGlobal

Unofficial

Capacitor global instance.

Import:

import type { CapacitorGlobal } from '@obsidian-typings/obsidian-catalyst-latest';

Signature:

export interface CapacitorGlobal

Properties

PropertyTypeDescription
DEBUG?booleanWhether debug mode is enabled.
Exceptiontypeof CapacitorExceptionCapacitor exception class.
isLoggingEnabled?booleanWhether logging is enabled.
isNative?booleanWhether the platform is native. @deprecated Deprecated.
platform?stringPlatform name. @deprecated Deprecated.
PluginsPluginRegistryPlugin registry. @deprecated Deprecated.
registerPluginRegisterPluginPlugin registration function.

Methods

MethodReturnsDescription
addListener(pluginName, eventName, callback)PluginListenerHandleAdds a listener for a plugin event.
convertFileSrc(filePath)stringConverts a file path to a source URL.
getPlatform()stringGets the current platform name.
isNativePlatform()booleanChecks if the platform is native.
isPluginAvailable(name)booleanChecks if a plugin is available.
pluginMethodNoop(target, key, pluginName)Promise<never>No-op for plugin methods.
removeListener(pluginName, callbackId, eventName, callback)voidRemoves a listener for a plugin event.

Links to this page: