Closed marcelo-tm closed 7 years ago
Hello, I think I found the problem myself here. The first test I made, I was using the Expo XDE, now I tried with vanilla React Native and got the right info:
{"description":"Chrome 57.0.2987.133 on OS X 10.12.4 64-bit","layout":"Blink","manufacturer":null,"name":"Chrome","prerelease":null,"product":null,"ua":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36","version":"57.0.2987.133","os":{"architecture":64,"family":"OS X","version":"10.12.4"}}
So, the problem is the Expo XDE... Sorry for the rushed question here.
Sadly it just only worked on the ios simulator. Android emulator and running directly on ios device don't return any values...
Is there any example on how to set the script on react native? I'm trying to import the library and include a log on the render function, but it prints an empty object.
Ex: import platform from 'platform';
render() { console.log(platform);
Prints: {}