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
928浏览 • 1回复 待解决
鸿蒙应用如何判断是否使用debug签名?
3095浏览 • 1回复 待解决
求大佬告知如何判断当前版本
1547浏览 • 1回复 待解决
HarmonyOS 怎么区分debugrelease
126浏览 • 1回复 待解决
判断当前设备是手机还是平板
5826浏览 • 1回复 待解决
如何获取Scroll组件的当前滚动偏移量
1734浏览 • 1回复 待解决
获取手机系统的api版本是
142浏览 • 1回复 待解决