You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
// Rename this sample file to main.js to use on your project.
// The main.js file will be overwritten in updates/reinstalls.
var rn_bridge = require(‘rn-bridge’);
// Echo every message received from react-native.
rn_bridge.channel.on(‘message’, async (msg) => {
switch (msg) {
case “save”:
break;
case “retrieve”:
break;
default:
break;
};
rn_bridge.channel.send(“From node in main.js”)
const IPFS = require(‘ifps’);
const ipfs_node = await IPFS.create();
rn_bridge.channel.send("from Node version " + ipfs_node.version);
} );
// Inform react-native node is initialized.
rn_bridge.channel.send(“Node was initialized.”);
The problem is that I never seen rn_b
ridge.channel.send("from Node version " + ipfs_node.version); get executed. Why ipfs initialization takes so long? Or my code isn’t right How to check if the ipfs is initialized successfully?