HarmonyOS如何判断应用的当前版本是debug还是release

HarmonyOS如何判断应用的当前版本是debug还是release

HarmonyOS
2024-08-27 11:17:38
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
FengTianYa

可以通过getBundleInfoForSelf获取自身的应用包信息,其中入参bundleFlags指定所返回的BundleInfo中所包含的信息,具体参考如下:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-bundlemanager-V5#bundlemanagergetbundleinfoforself

bundleManager.getBundleInfoForSelf(bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_APPLICATION).then((bundleInfo)=>{ 
  console.log(" appProvisionType is " +bundleInfo.appInfo.appProvisionType); 
})
分享
微博
QQ
微信
回复
2024-08-27 17:24:33
相关问题
如何判断当前release还是debug
2450浏览 • 1回复 待解决
HarmonyOS 判断应用debug还是release
1143浏览 • 1回复 待解决
如何检测应用当前版本是否最新?
394浏览 • 0回复 待解决
如何判断应用是否是debug
1382浏览 • 1回复 待解决
求大佬告知如何判断当前版本
2682浏览 • 1回复 待解决
鸿蒙应用如何判断是否使用debug签名?
4330浏览 • 1回复 待解决
判断当前设备是手机还是平板
7959浏览 • 1回复 待解决
HarmonyOS EcoDev 如何配置debug/release环境
1715浏览 • 1回复 待解决
HarmonyOS 怎么区分debugrelease
1972浏览 • 1回复 待解决