EOSIO / eosjs

General purpose library for the EOSIO blockchain.
http://eosio.github.io/eosjs
MIT License
1.43k stars 462 forks source link

IOS support #37

Closed cAstraea closed 6 years ago

cAstraea commented 6 years ago

Hello. Anyone knows of any standing issues ? Seems it's not working on ios(mobile safari) but I have no way to debug what's going on. Was working on other browser Update managed to connected the inspector on my iphone and got this ReferenceError: Can't find variable: Eos image

chris-allnutt commented 6 years ago

@cAstraea without a larger view of your file we won't be able to help much. If that's the error you're getting I'd check to make sure you're requiring the Eos library correctly.

cAstraea commented 6 years ago

Hello , I can't require it in browser.. i just included it with like in the examples here https://unpkg.com/eosjs@6.1.10/dist/ These also fail with the same error.

chris-allnutt commented 6 years ago

You still have to host the eos.js file somewhere, even it it's on your web server and then point the script tag to that destination.

e.g

My server has the following structure

/page.html
/eos.js

I would include it as follows:

<script src="/eos.js"></script>

Did you put the whole directory on your server and set the web root to the dist folder?

cAstraea commented 6 years ago

Yes it's correct . It's working on desktop browsers only ios mobile throws this error.

chris-allnutt commented 6 years ago

Is there any way for you to see a http request for the file, similar to chrome developer tools? That may help you find out where it's trying to request the file from.

cAstraea commented 6 years ago

image

Tried from local version also ...

Could try to make a webpack/browserify version but not sure how to do that..

jcalfee commented 6 years ago

I need to remove browserify and add webpack anyways. That should fix it.

jcalfee commented 6 years ago

Try eosjs@6.1.11 ... I adjusted browserify to pack the lib directory (es2015) instead of the src directory (e6).

43213f2add0a34212aff84d6f2068fb123baa216

jcalfee commented 6 years ago

Great, I see you left me a heart above! Ok, sounds like it works I'll close now.