IT评测·应用市场-qidao123.com
标题:
鸿蒙的Identifier获取
[打印本页]
作者:
尚未崩坏
时间:
2025-1-17 06:19
标题:
鸿蒙的Identifier获取
鸿蒙证书指纹,appid相干都是开放平台设置的。
这个Identifier在微信开放平台鸿蒙版设置时需要用:
这个id从哪里来呢?
方案一、
从华为开放背景取:
进入管理背景切到对应应用下找到APPID:
这个ID就是微信那边需要填写的Identifier
方案二、
在app里用代码打印出来:
import { bundleManager} from '@kit.AbilityKit';
let bundleFlags = bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_SIGNATURE_INFO
try {
bundleManager.getBundleInfoForSelf(bundleFlags).then((data) => {
hilog.info(0x0000, 'testTag', 'getBundleInfoForSelf successfully. Data: %{public}s', JSON.stringify(data));
}).catch((err: BusinessError) => {
hilog.error(0x0000, 'testTag', 'getBundleInfoForSelf failed. Cause: %{public}s', err.message);
});
} catch (err) {
let message = (err as BusinessError).message;
hilog.error(0x0000, 'testTag', 'getBundleInfoForSelf failed: %{public}s', message);
}
复制代码
上面的data.signatureInfo.appIndentifer就是所需
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
欢迎光临 IT评测·应用市场-qidao123.com (https://dis.qidao123.com/)
Powered by Discuz! X3.4