三方平台支持ASCF元服务,详情请参考HarmonyOS开发服务商开发指南接入。
开发者可以在AppScope/ext.json中配置所需的信息,三方平台会替换、自动替换后打包为不同的参数,并且会将ext对象生成ascf/ascf_src/extConfig.json。
ASCF框架API-三方平台提供了 has.getExtConfigSync 或者 has.getExtConfig 获取到这些配置信息。
has.getExtConfig({
success: (res) => {
console.info('getExtConfig success', res);
},
fail: (err) => {
console.error('getExtConfig fail', err);
},
complete: (res) => {
console.info('getExtConfig complete', res);
}
})