Confused about version in config.xml vs package.json

I’m working on an Ionic (v3) app that goes to Android and IOS. I’ve seen mixed messages on the web regarding which file I should update my version number.
config.xml:

<widget id="abc" version="1.0.0" xmlns="http://www.w3.org/ns/widgets"

package.json:

"version": "1.0.0",

or both?

I thought I read that config.xml was the driver of version, at least for Android. However, I came upon the npm package ionic-version that updates package.json only.

Can someone please shed some light on the difference between these version numbers as it relates to Ionic Apps and publishing to Apple/Android.

Thanks!

Read the description of ionic-version again - it explains that it is needed additionally to npm version ... that only updates package.json so config.xml gets updated. So yes, the apps get their value from config.xml and not package.json.

Thanks. I get it now. I didn’t really understand what it meant before.

1 Like