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

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

HarmonyOS
2024-08-27 11:17:38
3175浏览
收藏 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); 
})
  • 1.
  • 2.
  • 3.
分享
微博
QQ
微信
回复
2024-08-27 17:24:33


相关问题
如何判断当前release还是debug
1774浏览 • 1回复 待解决
HarmonyOS 判断应用debug还是release
538浏览 • 1回复 待解决
如何判断应用是否是debug
829浏览 • 1回复 待解决
求大佬告知如何判断当前版本
2185浏览 • 1回复 待解决
鸿蒙应用如何判断是否使用debug签名?
3767浏览 • 1回复 待解决
判断当前设备是手机还是平板
7105浏览 • 1回复 待解决
HarmonyOS EcoDev 如何配置debug/release环境
1126浏览 • 1回复 待解决