# Get application version from native

**URL:** <https://forum.ionicframework.com/t/get-application-version-from-native/87201>\
**Category:** ionic-v3\
**Created:** [April 20, 2017, 9:08am UTC](https://forum.ionicframework.com/t/get-application-version-from-native/87201 "2017-04-20T09:08:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bgiaraffa](https://avatars.discourse-cdn.com/v4/letter/b/c37758/32.png) [@bgiaraffa](https://forum.ionicframework.com/u/bgiaraffa)\
**Post date:** [April 20, 2017, 9:08am UTC](https://forum.ionicframework.com/t/get-application-version-from-native/87201/1 "2017-04-20T09:08:04Z")

</div>

I have built an application with Ionic 3 but I am absolutely SHOCKED to find out how difficult / impossible / not-documented it is to get your application’s version. So if I release a version “1.0.1” I have to change strings all over in the source code (and not forget any) because there is no way to get this programmatically? I see two plugins, one unmaintained for years and the other just doesn’t work because there aren’t clear directions on how to _use_ a cordova plugin in Ionic3. (Ok, I installed it. Now how do I import it or use it? Where is it? What is the difference between @ionic-native and ionic-native and @ionic-native/splash-screen and how would I get this import location if I didn’t know it)

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [April 20, 2017, 3:01pm UTC](https://forum.ionicframework.com/t/get-application-version-from-native/87201/2 "2017-04-20T15:01:41Z")

</div>

I am shocked by different things…

Here is the plugin you need:  
[http://ionicframework.com/docs/native/app-version/](http://ionicframework.com/docs/native/app-version/)

And here are additional information on installation:  
[http://ionicframework.com/docs/native/](http://ionicframework.com/docs/native/)

Not that hard…

---

<div class="post-metadata">

**Author:** ![bgiaraffa](https://avatars.discourse-cdn.com/v4/letter/b/c37758/32.png) [@bgiaraffa](https://forum.ionicframework.com/u/bgiaraffa)\
**Post date:** [April 27, 2017, 6:32am UTC](https://forum.ionicframework.com/t/get-application-version-from-native/87201/3 "2017-04-27T06:32:45Z")

</div>

I think a big part of the root cause of this is that I was using “ionic serve” instead of “ionic run browser”. Which is ignoring about 75 other things you need to do in order for that to happen. Then an only then does this work. This is super unclear in the documentation. Also, searching documentation for “publish” yields zero results. ?? What is aligning a zip? There basically is no documentation for publishing an ionic app.

---

<div class="post-metadata">

**Author:** ![ipsjolly](https://avatars.discourse-cdn.com/v4/letter/i/5f9b8f/32.png) [@ipsjolly](https://forum.ionicframework.com/u/ipsjolly)\
**Post date:** [December 10, 2018, 8:40am UTC](https://forum.ionicframework.com/t/get-application-version-from-native/87201/4 "2018-12-10T08:40:19Z")

</div>

I have this [tutorial](https://www.freakyjolly.com/ionic-4-get-app-version-name-version-code-and-package-name-using-ionic-native-plugin/) for Ionic 4

We can get values like

```
this.appVersion.getAppName().then(value => {
  this.AppName = value;
}).catch(err => {
  alert(err);
});

this.appVersion.getPackageName().then(value => {
  this.PackageName = value;
}).catch(err => {
  alert(err);
});

this.appVersion.getVersionCode().then(value => {
  this.VersionCode = value;
}).catch(err => {
  alert(err);
});

this.appVersion.getVersionNumber().then(value => {
  this.VersionNumber = value;
}).catch(err => {
  alert(err);
});
```

---

<div class="post-metadata">

**Author:** ![bgiaraffa](https://avatars.discourse-cdn.com/v4/letter/b/c37758/32.png) [@bgiaraffa](https://forum.ionicframework.com/u/bgiaraffa)\
**Post date:** [December 10, 2018, 5:51pm UTC](https://forum.ionicframework.com/t/get-application-version-from-native/87201/5 "2018-12-10T17:51:59Z")

</div>

This was about version number, and not application name

---

<div class="post-metadata">

**Author:** ![ipsjolly](https://avatars.discourse-cdn.com/v4/letter/i/5f9b8f/32.png) [@ipsjolly](https://forum.ionicframework.com/u/ipsjolly)\
**Post date:** [December 11, 2018, 6:49am UTC](https://forum.ionicframework.com/t/get-application-version-from-native/87201/6 "2018-12-11T06:49:38Z")

</div>

hi @bgiaraffa, I have updated code here for other methods too
