For AI agents: the complete documentation index is available at /apps-plugin/docs/llms.txt, the full documentation bundle is available at /apps-plugin/docs/llms-full.txt, and this page is available as Markdown at /apps-plugin/docs/js-api/basic/system/getAppBaseInfoSync.md.

getAppBaseInfoSync

获取应用基础信息。

扫码预览

扫码预览 getAppBaseInfoSync

支持版本

前端库版本不低于 0.0.18。

支持平台

平台支持情况
Android支持
iOS支持
PC不支持
HarmonyOS不支持

支持场景

场景支持情况
页面支持
卡片支持

使用说明

  • 当前不返回 enableDebug;如需获取调试状态,请使用 getSystemInfo 或 getSystemInfoSync。

调用方式

同步 API

getAppBaseInfoSync(_params?: object): GetAppBaseInfoResult

入参

无。

调用示例

import { getAppBaseInfoSync } from '@doubao-dev/framework/api';

const result = getAppBaseInfoSync();

console.log(result.language, result.SDKVersion, result.theme);
console.log(result.host?.appId);

返回值

名称类型必返说明
enableDebugboolean否是否已打开调试
hostAppBaseInfoHost否当前豆包客户端信息
host.appIdstring否当前豆包客户端的 appId
languagestring是当前语言
SDKVersionstring否客户端基础库版本
theme"light" | "dark"否当前主题
versionstring否豆包客户端版本号

返回示例

{
  "SDKVersion": "0.0.36",
  "host": {
    "appId": "doubao"
  },
  "language": "zh_CN",
  "version": "8.0.0",
  "theme": "light"
}