I am developing a mobile DAPP using ionic frame work, everything was fine when I testing on the browser. However I try to build my app on IOS, and run it on my Iphone7, the web3 doesn't work(did't have any action within the app), then I try to debug with the ionic dev app, and it show up an error with Invalid JSON RPC response. And I try to build as android app, and everything works. My ERC20 token contract was deployed on the Ropsten network.

enter image description here

My app information:

ionic 3.9.2

web3 1.0.0-beta.36

ethereumjs-tx 1.3.7

ethereumjs-util 6.0.0

provider: 'https://ropsten.infura.io/v3/myapikey',

import Web3 from 'web3';
this.web3js = new Web3(new Web3.providers.HttpProvider(provider));
this.tokenContract = new this.web3js.eth.Contract(abi,contractAddress);

Does anyone face the same issue before?

Thank in advance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.