Hi. NS.
I want get name and version of nativescript in my App.
It's similar using const {name, version } = require("react-native/package.json"); in RN.
Use appversion
import * as appversion from "nativescript-appversion";
appversion.getVersionName().then((v: string) => {
console.log("Your app's version is: " + v);
this.verstr = localize("Version") + ': ' + v;
})
:wave: @Joy1024, we use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please, use Stackoverflow to get help.
Use appversion
import * as appversion from "nativescript-appversion";appversion.getVersionName().then((v: string) => { console.log("Your app's version is: " + v); this.verstr = localize("Version") + ': ' + v; })
I try the code above.
I want get name and version of NativeScript not myApp.
It expect is name:NativeScript version:6.1.2.
Most helpful comment
Use appversion
import * as appversion from "nativescript-appversion";