Search code examples
iosionic-frameworkversioningcapacitor

Ionic capacitor build number


I am moving an app from pure Cordova to Ionic capacitor.

Is it possible to get the iOS build number in capacitor iOS?

https://capacitor.ionicframework.com/docs/apis/device/

seems to suggest so, but appBuild is undefined for me.

Previously I was using a cordova plugin and setting the build number in ios-CFBundleVersion in the config.xml

There seems to be no obvious place (other than xcode) to put a bundle/build version...

Anyone else solved this problem?

Edit: seems this is fixed on master branch of capacitor https://github.com/ionic-team/capacitor/blob/master/ios/Capacitor/Capacitor/Plugins/Device.swift


Solution

  • Looks like the docs were deployed after the feature was added to master, but the feature was still not released. Update to 1.3.0 and you’ll be able to use it now.