As I understand it, I can set a version in <widget> of config.xml. Then when I build my project, Cordova somehow generated “build numbers” out of that.
But each build for a version seems to get the same build number (iOS identical to the version, for Android the versionCode is some math calculated out of the major.minor.patch => major0minor0patch), so not very useful.
There also seem to be iOS and Android specific “build numbers” I can set in config.xml: android-versionCode and ios-CFBundleVersion. But then I have to manage these myself, similar to the version.
How do you handle version and build numbers?
Do you have the same build numbers on iOS and Android?
How do you handle builds of Ionic? Does it also have a version number somehow?
Hi did you found a solution for this? There are hooks and something like that, in the hook we can override the build number manually but we are searching for a parameterized variables like that
version="$VERSION_NUMBER", and on the hook we can change the parameter reading from another configuration file.
My intention was, on every production build I would like to increment an iterator an variable, and this variable I would like to use in my config.xml. I’m not sure if there is a possibility to use VARIABLES in config.xml and cordova builds?
This sounds like a problem for a build script or process modification.
#1 In Cordova world hooks exist, #2 in Ionic world you can modify what script is executed by modifying the scripts portion of your package.json. #3 If you use a CI service, that can probably also doe things before actually calling ionic cordova build.
Yes I saw the hooks and there I can run a javascript which is reading changing config.xml file and set version number.
But probably this all is a little bit to complicate and probably it is better handle the version number by hand.
We have to synchronize the sentry.io RELEASE number with the cordova VERSION, doing this manually often is something anybody probably forget. But setting an automatic version number not a build number is perhaps also not a good idea.
I know @Sujan12 is working on a tutorial to integrate fastlane with ionic on ionic.zone.
I followed the tutorial of fastlane and used the cordova plugin for it.
The only custom piece of code I wrote was for changing the version number as described in my previous post (I used the gem nokogiri to modify config.xml).