Error code 65 for command: xcodebuild How solve it?

Issue

I run ionic cordova build ios and the response ever is a error

Please help me

** BUILD FAILED **


The following build commands failed:
    CompileXIB MyApp/Classes/MainViewController.xib
(1 failure)
CordovaError: Promise rejected with non-error: 'Error code 65 for command: xcodebuild with args: -xcconfig,/Users/linuxplus/Public/Teste/platforms/ios/cordova/build-debug.xcconfig,-workspace,MyApp.xcworkspace,-scheme,MyApp,-configuration,Debug,-sdk,iphonesimulator,-destination,platformiOS Simulator,nameiPhone SE,build,CONFIGURATION_BUILD_DIR/Users/linuxplus/Public/Teste/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR/Users/linuxplus/Public/Teste/platforms/ios/build/sharedpch'
    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.

Solution

This must be appearing in Xcode 10.x, I believe. In that case, it is because the build system has been changed in Xcode 10.x.

Try using below command:

  • Build: ionic cordova build ios -- --buildFlag"-UseModernBuildSystem0"

  • Run: ionic cordova run ios -- --buildFlag"-UseModernBuildSystem0" --livereload

Reference: https://github.com/apache/cordova-ios/issues/407#issue-360392411

Hope this helps.

Answered By – Mrunal

Leave a Comment