react-native-wechat icon indicating copy to clipboard operation
react-native-wechat copied to clipboard

Calling bridge.imageLoader is deprecated and will not work in newer versions of RN

Open chenweigh opened this issue 4 years ago • 7 comments

Run command

let uri = "/private/var/mobile/Containers/Data/Application/D0FC15EC-3194-4713-819F-32D9FD7FB5ED/tmp/ReactNative/64EB8583-905C-4C97-B485-8479EF4FF5E8.png"
let option = {
      type: 'imageFile',
      title: 'Test sharing',
      description: 'This is a test',
      imageUrl: "file://" + uri,
};
WeChat.shareToSession(option).then(()=>{}).catch(()=>{});

Problem

Calling bridge.imageLoader is deprecated and will not work in newer versions of RN. Please update to the moduleForClass API or turboModuleLookupDelegate API.

Environment

react: 16.11.0
react-native: 0.62.2
react-native-wechat: ^1.9.12

chenweigh avatar Jun 29 '20 11:06 chenweigh

@chenweigh Same Issue,Did you solve it?

Liqiankun avatar Jul 10 '20 07:07 Liqiankun

碰到同样问题,分享到微信时,不显示缩略图

YangShaoXiong avatar Jul 29 '20 06:07 YangShaoXiong

await WeChat.shareToTimeline({
          type: 'news',
          title: '这是一条来自XX2.0的文章',
          description: '^^是不是很期待',
          thumbImage: 'https://img.jpeg',
          webpageUrl: 'http://www.baidu.com'
        })

@YangShaoXiong 安装到真机就没问题了。

Liqiankun avatar Jul 29 '20 07:07 Liqiankun

await WeChat.shareToTimeline({
          type: 'news',
          title: '这是一条来自XX2.0的文章',
          description: '^^是不是很期待',
          thumbImage: 'https://img.jpeg',
          webpageUrl: 'http://www.baidu.com'
        })

@YangShaoXiong 安装到真机就没问题了。

请问下你用到React Native的哪个版本,我用的是0.62.2,安装到真机也同样有问题,排查到是ios代码中_bridge是个nil

YangShaoXiong avatar Jul 29 '20 13:07 YangShaoXiong

@YangShaoXiong

    "react": "16.11.0",
    "react-native": "0.62.2",

真机Release就没问题了

Liqiankun avatar Jul 29 '20 13:07 Liqiankun

@YangShaoXiong

    "react": "16.11.0",
    "react-native": "0.62.2",

真机Release就没问题了

我这边不管是在Debug还是Release都不行。

YangShaoXiong avatar Jul 30 '20 02:07 YangShaoXiong

@chenweigh 请问有没有解决呢

Wjt958 avatar Jan 19 '21 09:01 Wjt958