自己项目中嵌套uniapp小程序SDK,打开小程序后,使用扫一扫功能,打开黑屏。
离线打包的时候是正常的。所以生产的.wgt包是没有问题的
- 发布:2021-01-11 19:53
- 更新:2022-11-04 15:25
- 阅读:2521
产品分类: uni小程序SDK
手机系统: iOS
手机系统版本号: IOS 14
手机厂商: 苹果
手机机型: iPhone X
页面类型: vue
SDK版本号: 3.0.4
操作步骤:
预期结果:
uniappSDK小程序SDK,能够正常使用扫一扫
uniappSDK小程序SDK,能够正常使用扫一扫
实际结果:
uniappSDK小程序SDK,无法使用扫一扫
uniappSDK小程序SDK,无法使用扫一扫
bug描述:
[1243:171405] [Runtime][DEBUG:] show NWindow--[page1610365374183]
[1243:171670] <Weex>[log]WXSDKInstance.m:503, Start rendering page:__uniappscan.js
[1243:171675] <Weex>[warn]WXComponentFactory.m:238, No component config for name:barcode, use default config
[1243:171675] <Weex>[error]render_manager.cpp:385, <WeexCore> RenderManager::CreateFinish 2
[1243:171675] <Weex>[error]render_action_createfinish.cpp:26, <WeexCore> RenderActionCreateFinish::RenderActionCreateFinish
[1243:171405] [Runtime][INFO:] refreshWhitePageCheckWebview---evt[3]---[<PDRCoreAppFrame: 0x13d81e200; frame = (0 0; 375 778); clipsToBounds = YES; layer = <CALayer: 0x2818c7c00>>]
上面是打开扫一扫的时候的日志。
<Weex>[error]WXBridgeContext.m:1310, jsLog: TypeError: this.$refs.barcode.setFlash is not a function. (In 'this.$refs.barcode.setFlash(this.enabledFlash)', 'this.$refs.barcode.setFlash' is undefined) __ERROR
上面是点击“清除关闭”按钮的日志
使用uniappSDK时,扫一扫在iOS手机上打开黑屏, 相机相册权限都打开了。 使用离线打包的时候是正常的。使用uniappSDK就有问题
[1243:171675] [warn]WXComponentFactory.m:238, No component config for name:barcode, use default config
barcode 这个组件没注册成功 请检查是否按照配置 完整设置了
nvue 页面使用Barcode组件按照文档添加库后同样无法扫描
报错信息:
2022-09-22 14:51:18.299456+0800 yhd_super_app[71878:3464266] <Weex>[warn]WXComponentFactory.m:190, Fail to find selector with componet name:barcode and method:start, please check if the parameters are correct !
将这里面的对应的依赖库或者资源文件全部添加进去就好了,已经解决问题
-
非专业开发人员 (作者)
回复 1***@qq.com: 下载下来的SDK包里,有个Feature-iOS.xls文件,或者访问https://nativesupport.dcloud.net.cn/UniMPDocs/UseModule/ios/ios.html#
2022-12-28 16:59
非专业开发人员 (作者)
解决了,是你们文档有问题。我按照你们Feature-iOS.xls表中的barcode(vue)添加了类库, 就有上面的错误。 把barcode(nvue)中的类库也添加上后才正常。 但是我的项目都是vue的
2021-01-12 09:14
h***@126.com
回复 非专业开发人员:
如何解决的? 能说一下详细步骤吗?我们IOS 这个问题困扰好久了
2021-04-24 20:15
非专业开发人员 (作者)
回复 h***@126.com: 上面有说啊,添加nvue里面的类库
2021-10-25 10:27