react-native-ipfs-demo icon indicating copy to clipboard operation
react-native-ipfs-demo copied to clipboard

Help wanted for react native v0.64

Open ravi0the0sun opened this issue 3 years ago • 12 comments

React Native Version

0.64.1

IPFS HTTP Client version

^50.1.1

Platform

IOS

Hi there, when i try to use add function it give an error of

 ERROR  Demo App .add string {"error": [TypeError: Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.]}

Example of code

const addString = async (client) => {
  console.log('Demo App .add string start');

  const file = {
    path: '/tmp/rn-ipfs-add-string',
    content: '邑中陽裏人也,姓劉氏。母媼嘗息大澤之陂,夢與神遇',
  };
  try {
    console.log('Demo App .add string', {
      result: inspect(await client.add(file)),
    });
  } catch (error) {
    console.error('Demo App .add string', {error});
  }
};

More info of enviroment

System:
    OS: macOS 10.15.7
    CPU: (4) x64 Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
    Memory: 8.51 GB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 14.17.0 - /var/folders/nf/83z965450dd46qzdlrd86t6h0000gn/T/fnm_multishells/892_1624954243867/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.14.13 - /var/folders/nf/83z965450dd46qzdlrd86t6h0000gn/T/fnm_multishells/892_1624954243867/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.2, DriverKit 19.0, macOS 10.15, tvOS 14.2, watchOS 7.1
    Android SDK:
      API Levels: 23, 27, 28, 29, 30
      Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.2
      System Images: android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom_64, android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom_64, android-30 | Google Play Intel x86 Atom_64
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.1 AI-201.8743.12.41.7042882
    Xcode: 12.1.1/12A7605b - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.11 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: ^0.64.1 => 0.64.1 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

ravi0the0sun avatar Jun 29 '21 08:06 ravi0the0sun