Skip to content

fetchDistributePackageUpdate ​

公开分发接口:按系统检查整包更新并读取安装信息。platform 为 android、harmony 或 ios。

函数签名 ​

typescript
function fetchDistributePackageUpdate(
  deps: DistributePackageFetchDeps,
  bundleId: string,
  opts: { platform: 'android' | 'ios' | 'harmony'; versionCode?: string; versionName?: string },
): Promise<DistributeCheckUpdateResult>

function fetchDistributePublicInstall(
  deps: DistributePackageFetchDeps,
  shortcut: string,
): Promise<DistributePublicInstallInfo>

前置依赖 ​

参数名说明
buildApiUrl拼 REST 路径
fetchFnfetch
parseErrorAndThrow非 2xx 抛错