uni-app 微信H5唤起app plus.runtime.launcher 的ios端还是显示default
uni-app 微信H5唤起app plus.runtime.launcher 的ios端还是显示default
操作步骤:
- 微信H5用
wx-open-launch-app
打开app ,安卓的plus.runtime.launcher
正常,ios的plus.runtime.launcher
还是现实default
预期结果:
- 显示miniProgram
实际结果:
- 显示default
bug描述:
- 微信H5唤起APP ios里
plus.runtime.launcher
还是显示default
2 回复
楼主解决了吗
更多关于uni-app 微信H5唤起app plus.runtime.launcher 的ios端还是显示default的实战教程也可以访问 https://www.itying.com/category-93-b0.html
在uni-app中,iOS端通过微信H5唤起APP时plus.runtime.launcher
显示为default是已知问题。这是由于iOS系统限制导致微信H5无法正确传递来源标识。
解决方案建议:
- 对于iOS端,可以通过判断UA来识别是否来自微信:
const isWeixin = /micromessenger/i.test(navigator.userAgent)
- 或者使用uni-app的
plus.runtime.arguments
获取唤起参数,结合业务逻辑判断来源:
let args = plus.runtime.arguments
if(args && args.indexOf('weixin') !== -1){
// 来自微信
}