Home:ALL Converter>How to print application version on older React-native releases

How to print application version on older React-native releases

Ask Time:2016-11-16T13:14:30         Author:Akbar

Json Formatter

I'm writing react-native application, where I want to display application's current version name in one of the components, let's say in Text.

Before there was a question about how to get that version, and the answer was to use react-native-device-info.

Now the problem is, I'm using react-native version 0.35 for my project, because I've got to use CodePush as well and CodePush yet doesn't support >=0.36 versions.

When I want to install react-native-device-info and run:

npm install --save react-native-device-info

I get the following error:

├── UNMET PEER DEPENDENCY [email protected]
├── [email protected] 
└── UNMET PEER DEPENDENCY whatwg-fetch@^1.0.0

On react-native-device-info's github page it doesn't say anything about this issue and it seems like it should support react-native 0.35, but it doesn't specify anywhere which version of the module exactly should I use (if this is the reason).

Author:Akbar,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/40624525/how-to-print-application-version-on-older-react-native-releases
yy