3

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,platform=iOS Simulator,name=iPhone 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.
Juliano Silva
  • 41
  • 1
  • 1
  • 6
  • Hope this helps : https://stackoverflow.com/questions/34166175/cordova-run-with-ios-error-error-code-65-for-command-xcodebuild-with-args – Mahesh Shahane Jan 21 '19 at 12:43

2 Answers2

8

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="-UseModernBuildSystem=0"

  • Run: ionic cordova run ios -- --buildFlag="-UseModernBuildSystem=0" --livereload

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

Hope this helps.

Mrunal
  • 13,982
  • 6
  • 52
  • 96
  • Xcode 8.2.1 and macOS sierra 10.12 I try thats flags but don't work – Juliano Silva Jan 21 '19 at 17:06
  • Which command you are running for this ? Check this: https://github.com/ionic-team/ionic-cli/issues/1197#issuecomment-234578084 – Mrunal Jan 22 '19 at 06:41
  • ionic cordova build ios --prod – Juliano Silva Jan 22 '19 at 13:38
  • My ionic info ``` Ionic: ionic (Ionic CLI) : 4.8.0 (/usr/local/lib/node_modules/ionic) Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.2.1 Cordova: cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1) Cordova Platforms : ios 4.5.5 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.2, (and 4 other plugins) System: ios-sim : 7.0.0 NodeJS : v10.15.0 (/usr/local/bin/node) npm : 6.4.1 OS : macOS Sierra Xcode : Xcode 8.2.1 Build version 8C1002 ``` – Juliano Silva Jan 23 '19 at 09:45
0

Try

ionic cordova build ios --prod --verbose -- --buildFlag="-UseModernBuildSystem=0"
Louie Miranda
  • 1,071
  • 1
  • 20
  • 36