Generates an iOS, Android or an iOS and Android build based on your Step settings and a build.json file which is inherited from the Generate cordova build configuration Step.
Configuring the Step
- In the Platform to use in ionic-cli commands input, select the platform you wish to build for from the drop-down menu.
- In the Build command configuration input, select either
debugorreleasemode from the drop-down menu. If you setreleaseto generate a release build, then you should selectdeviceinstead ofemulatorin the Build command target. - Select either
emulatorordevicein the Build command target field. - Make sure the file path set in the Working directory is pointing to the path where your project's code got downloaded to.
If you're using any services of the Ionic framework which requires login credentials, you have to provide those in the Ionic username and Ionic password inputs. Don't worry, these are stored as secret Environment Variables.
If you wish to to modify your native projects by inserting the Ionic Prepare Step before the Ionic Archive Step, then make sure you set the Should
ionic cordova preparebe executed beforeionic cordova build? input tofalsein the Ionic Archive Step. The Build configuration path to describe code signing properties input is automatically filled out with the output Environment Variable of the Generate cordova build configuation Step. You do not need to modify this input.
Troubleshooting
Make sure you add the Ionic Archive Step AFTER the Generate cordova build configuration Step as the latter generates the build config file which the Ionic Archive Step uses to successfully build an iOS and/or Android project.
Make sure you insert the Ionic Archive Step BEFORE any deploy Step.
Note that if you’re building for both iOS and Android in one workflow, and either of your apps fails, the whole Ionic Archive Step will fail.
If you set the Build configuration input in the Generate Cordova Build Configuration Step to release, then you need to use the release configuration in the Ionic Archive Step as well.
Useful links
- Getting started with Ionic/Cordova apps on Bitrise
- Secret Environment Variables on Bitrise
- Ionic framework

