GithubHelp home page GithubHelp logo

ravi0the0sun / react-native-ipfs-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ipfs-shipyard/react-native-ipfs-demo

1.0 0.0 0.0 1.31 MB

Demo app exploring IPFS in React Native.

License: MIT License

JavaScript 58.94% Starlark 2.05% Java 21.30% Ruby 2.61% Objective-C 15.09%

react-native-ipfs-demo's Introduction

IPFS React Native Demo App

This project explores and documents how IPFS' HTTP client can be used in a React Native app targeting Android and iOS platforms.

Usage

Spawn a local IPFS node with the daemon command. The app assumes the HTTP API is exposed at http://localhost:5002.

Run the app on Android

$ npm run android:debug
$ npm run android:release

In order connect to the IPFS node running on your development machine when running the app on a physical device with USB debugging enabled, run the following command:

$ adb -s <device name> reverse tcp:5002 tcp:5002

To find the device name, run the following adb command:

$ adb devices

Sources:

Run the app on iOS

npm run ios:debug
npm run ios:release

In order connect to the IPFS node running on your development machine when running the app on a physical iPhone, you must use the LAN IP of your machine. Also, note that In order to run the app on a physical iPhone, you must create and setup an Apple Developer Certificate.

Configuration

If you need to change the input URLs for the HTTP client factory on both Android and iOS, you can do so by editing config.js file.

Feel free to tweak the parameters (CIDs, multiaddr, etc.) for each HTTP client method by editing the corresponding code in each screen.

Requirements to use HTTP client

The environment must be polyfilled right when your app starts and before anything is rendered.

Alternative fetch polyfill

Instead of using the fetch implementation that ships with React Native, which is provided by GitHub's fetch polyfill, this demo is now using react-native-fetch-api. It implements Response.body to add support for text streaming via native incremental data events.

Known issues and limitations

react-native-ipfs-demo's People

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.