sud.getAppBaseInfo
Synchronously gets basic application information.
javascript
const appInfo = sud.getAppBaseInfo();Parameters
None.
Return Value
Object.
| Property | Type | Description |
|---|---|---|
| SDKVersion | string | Current SUD SDK version; the property name is case-sensitive |
| enableDebug | boolean | Whether debug mode is enabled |
| language | string | Application language |
| theme | string | Current theme: light or dark |
| fontSizeScaleFactor | number | Font scaling factor reported by the app |
| fontSizeSetting | number | Font size setting reported by the app |
| version | string | Host app version; optional, so check that it exists before using it |
Usage Notes
This API returns synchronously and does not use callbacks or a Promise. Apps may provide different additional information. Only use optional fields when present, and do not require them to start the game.
Example
javascript
const appInfo = sud.getAppBaseInfo();
console.log('SDK version', appInfo.SDKVersion);
console.log('Application language', appInfo.language);
console.log('Dark theme', appInfo.theme === 'dark');
if (appInfo.version) {
console.log('App version', appInfo.version);
}