CapacitorGlobal
Unofficial
Capacitor global instance.
Import:
import type { CapacitorGlobal } from '@obsidian-typings/obsidian-public-latest';Signature:
export interface CapacitorGlobalProperties
| Property | Type | Description | |
|---|---|---|---|
| DEBUG? | boolean | Whether debug mode is enabled. | |
| Exception | typeof CapacitorException | Capacitor exception class. | |
| isLoggingEnabled? | boolean | Whether logging is enabled. | |
| isNative? | boolean | Whether the platform is native. @deprecated Deprecated. | |
| platform? | string | Platform name. @deprecated Deprecated. | |
| Plugins | PluginRegistry | Plugin registry. @deprecated Deprecated. | |
| registerPlugin | RegisterPlugin | Plugin registration function. |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| addListener(pluginName, eventName, callback) | PluginListenerHandle | Adds a listener for a plugin event. | |
| convertFileSrc(filePath) | string | Converts a file path to a source URL. | |
| getPlatform() | string | Gets the current platform name. | |
| isNativePlatform() | boolean | Checks if the platform is native. | |
| isPluginAvailable(name) | boolean | Checks if a plugin is available. | |
| pluginMethodNoop(target, key, pluginName) | Promise<never> | No-op for plugin methods. | |
| removeListener(pluginName, callbackId, eventName, callback) | void | Removes a listener for a plugin event. |
Links to this page: