NSString*ticketString = ticketinput.text;
WXLaunchMiniProgramReq *launchMiniProgramReq = [WXLaunchMiniProgramReq object];
launchMiniProgramReq.userName = @"gh_471f5f7b25a9"; // 注意这是微信硬件的username,不需要改动
launchMiniProgramReq.path = [NSString stringWithFormat:@"pages/discover-new/discover-new?ticket=%@",ticketString];
//以绑定为例,路径示例:"pages/discover-new/discover-new?ticket=234234",内部字符串不需要引号;
launchMiniProgramReq.miniProgramType = WXMiniProgramTypeRelease;
[WXApi sendReq:launchMiniProgramReq completion:^(BOOL success) {
}];
调起微信之后,添加设备, 最后报错 “设备未添加”如图
安卓按照文档https://iot.weixin.qq.com/doc?page=3-4 也报同样的错误
[WXApi registerApp:wxAppID universalLink:wxUniversalLink];
wxAppID和硬件开发平台的appid 不一致,
也尝试了改为一样的,会报bad_parameter
使用以前的wxAppID,包如上图的“设备未添加”,其实后台服务已经注册设备到微信硬件平台了, 通过扫描二维码的方式可以添加设备,通过 使用移动应用APP
方式,添加不上
