鸿蒙证书指纹,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就是所需