ionic build --release --prod ios fails - ionic-framework

ionic build --release --prod ios has begun failing intermitently and gives the following error:
Error: Error code 65 for command: xcodebuild with args: -xcconfig
Any ideas?
Ionic 2.2.1
Xcode 8

The following procedure worked for me:
deleted the node_module folder
NPM Install
ionic Serve
Stop server
ionic platform add ios
ionic build --release --prod ios

Related

How to fix build failed issue in Ionic 3 for android?

When I try ionic cordova build android --prod --release command in Ionic 3, it shows an error
[12:24:50] ionic-app-script task: “build”
[12:24:50] Error: The Angular AoT build failed. See the issues above
Error: The Angular AoT build failed. See the issues above
at /Users/angelamal/Documents/osome/node_modules/#ionic/app-scripts/dist/aot/aot-compiler.js:237:55
at step (/Users/angelamal/Documents/osome/node_modules/#ionic/app-scripts/dist/aot/aot-compiler.js:32:23)
at Object.next (/Users/angelamal/Documents/osome/node_modules/#ionic/app-scripts/dist/aot/aot-compiler.js:13:53)
at fulfilled (/Users/angelamal/Documents/osome/node_modules/#ionic/app-scripts/dist/aot/aot-compiler.js:4:58)
[ERROR] An error occurred while running subprocess ionic-app-scripts.
ionic-app-scripts build --prod --target cordova --platform android exited
with exit code 1.
While I try to build an android app in Ionic 3.
I used this command ionic cordova build android --prod --release
But it is showing an error. How to solve this?
Thanks in Advance

ionic cordova build android difference between

Please Explain me difference between:
ionic cordova build android -> .apk Slowin loading
ionic cordova build android --prod -> .apk Fast in loading
ionic cordova build android --prod --release -> .apk Slow in loading
Thanks
Without flags it generates the apk debug version. And with release it generates the apk ready for the store but unsigned when you sign it you can upload it.
The --prod flag:
This will minify your app’s code as Ionic’s source and also remove any debugging capabilities from the APK.

ionic app error while building Android APK

I am getting the error while building the ionic app ,ionic-app-script is missing.How to add 'ionic-app-script' file in ionic 2 project? what is the purpose of this file?
just delete platform folder and run
ionic cordova build android --release --prod

Fail to build android Ionic version 1

I have an Ionic version 1 project and install Ionic version 4 on my linux machine.
When trying to build an Android using ionic build android e get this error message:
Unable to load PlatformApi from platform. Error: Cannot find module '/home/myuser/ionic/myapp/platforms/android/cordova/Api.js'
How can i solve this problem?
this issue in latest ionic and cordova versions. try to Run following steps
ionic cordova platform rm browser/android/ios
ionic cordova run --emulator

Ionic ios failed build

I have problem when i bulid ios using ionic cordova build ios --release
how can i solve it , i am using macOS
Apple-User:alfraseh FirasHunaiti$ ionic cordova build ios --release
> ionic-app-scripts build --target cordova --platform ios
Error: spawn EACCES
at ChildProcess.spawn (internal/child_process.js:313:11)
at Object.exports.spawn (child_process.js:503:9)
at spawn
(/usr/local/lib/node_modules/ionic/node_modules/cross-spawn/index.js:17:18)
at spawn
(/usr/local/lib/node_modules/ionic/node_modules/#ionic/cli-framework/utils/shell.js:124:12)
at ShellCommand.spawn
(/usr/local/lib/node_modules/ionic/node_modules/#ionic/cli-framework/utils/shell.js:113:16)
at ShellCommand.run
(/usr/local/lib/node_modules/ionic/node_modules/#ionic/cli-framework/utils/shell.js:80:24)
at Shell.<anonymous>
(/usr/local/lib/node_modules/ionic/node_modules/#ionic/cli-utils/lib/shell.js:32:37)
at Generator.next (<anonymous>)
at /usr/local/lib/node_modules/ionic/node_modules/tslib/tslib.js:107:75
at new Promise (<anonymous>)
Build the project for ios (Xcode) sudo ionic cordova prepare iOS or sudo ionic Cordova build ios then go to the platform folder in the project and open with xcode the one that I export to you, and from xcode compile the project.