getAppVersion
Returns the host application version declared during SDK configuration.
Overview
Use getAppVersion to read back the appVersion value that was passed to configure. When configure was called without an appVersion parameter, this method returns undefined.
The host app version is used internally to gate client_settings rules that carry since_version or below_version bounds. If no version is declared, version-bounded rules resolve to their authored default.
Method Signature
getAppVersion(): string | undefined
Parameters
This method takes no parameters.
Return Value
The host application version string as passed to configure, or undefined if appVersion was not provided. Leading and trailing whitespace is trimmed automatically.
Example
import SDK from "@maestro_io/maestro-web-sdk";
SDK.configure({
siteID: "<your-site-id>",
appVersion: "2.1.0",
});
const version = SDK.getAppVersion(); // '2.1.0'
Notes
- Returns
undefinedwhenappVersionis omitted fromconfigureor passed as an empty string. - See
configurefor the full list of configuration options.