Last Updated On June 13, 2020
In order to build your app you’ll need all the tools shown inside this guide, be sure everything returned by “ionic info” into your terminal is the same as the picture in the guide.
Build android:
Run the following command
ionic cordova build android --prod --release
The the .apk file will be produced, follow the path written on your shell to found it.
Build iOS
Run the following command
ionic cordova build ios --prod
The the ..xcodeproj file will be produced, follow the path written on your shell to found it. You need now to open it on Xcode.
Hi there,
Running “ionic cordova build ios –prod” on Linux produced the following error:
==================================================================
> cordova build ios
Discovered plugin “mx.ferreyra.callnumber” in config.xml. Adding it to the project
Plugin “call-number” already installed on android.
Plugin “call-number” already installed on ios.
Conflict found, edit-config changes from config.xml will overwrite plugin.xml changes
CordovaError: Promise rejected with non-error: ‘xcodebuild was not found. Please install version 9.0.0 or greater from App Store’
at cli.catch.err (/usr/local/lib/node_modules/cordova/bin/cordova:30:15)
at process._tickCallback (internal/process/next_tick.js:68:7)
[ERROR] An error occurred while running subprocess cordova.
cordova build ios exited with exit code 1.
Re-running this command with the –verbose flag may provide more information.
=========================================================================
I am not sure why is it asking for Xcode. I was under the impression that it will only generate a X proj file.
Thanks
Hi Maya, app development for Apple products requires a Mac, it is mandatory to have Xcode installed, and Xcode it’s available only on Mac
I run this command for android building:
ionic cordova build android –prod –release –verbose
but after a while it doesn’t bring anything. in the video we have also other steps.
i see this mesage at the end:
ionic:utils-process processExit: exiting (exit code: 1) +2ms
how to buid an apk file?