Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

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

Open
chenweigh opened this issue Jun 29, 2020 · 7 comments

Comments

@chenweigh
Copy link

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
@Liqiankun
Copy link

Liqiankun commented Jul 10, 2020

@chenweigh Same Issue,Did you solve it?

@YangShaoXiong
Copy link

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

@Liqiankun
Copy link

Liqiankun commented Jul 29, 2020

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

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

@YangShaoXiong
Copy link

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

@Liqiankun
Copy link

@YangShaoXiong

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

真机Release就没问题了

@YangShaoXiong
Copy link

@YangShaoXiong

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

真机Release就没问题了

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

@Wjt958
Copy link

Wjt958 commented Jan 19, 2021

@chenweigh 请问有没有解决呢

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants