接入微信SDK从iOS端拉起小程序出现“由于应用universal link校验不通过”
并且日志报错如下:
Error:fail to load Keychain status:-25300, keyData null:1
核心代码如下:
WXLaunchMiniProgramReq *launchMiniProgramReq = [WXLaunchMiniProgramReq object];
launchMiniProgramReq.userName = @"xxxx";
launchMiniProgramReq.path = @"pages/index/index";
launchMiniProgramReq.miniProgramType = WXMiniProgramTypePreview; //拉起小程序的类型
[WXApi sendReq:launchMiniProgramReq completion:^(BOOL success) {
}];
universal link在微信开放平台已经设置好,并且按照文档步骤检验过。
已解决,launchMiniProgramReq.userName = @"xxxx";
这里的userName是小程序的原始ID并不是注释里面的“小程序username”