Ionic ios app MainController.xib build failed

Sometimes, when I try to create an ios project on xcode, I get the following error:

The following build commands failed: CompileXIB ProjectName/Classes/MainViewController.xib Error code 65 for command: xcodebuild with args: -xcconfig,/Users/ritesh/Documents/Projects/test-app/platforms/ios/cordova/build-debug.xcconfig,-project,ProjectName.xcodeproj,ARCHS=i386,-target,ProjectName,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/ritesh/Documents/Projects/test-app/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/ritesh/Documents/Projects/test-app/platforms/ios/build/sharedpch ERROR building one of the platforms: Error: /Users/ritesh/Documents/Projects/test-app/platforms/ios/cordova/build: Command failed with exit code 2 You may not have the required environment or OS to build this project Error: /Users/ritesh/Documents/Projects/test-app/platforms/ios/cordova/build: Command failed with exit code 2 at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:139:23) at ChildProcess.emit (events.js:110:17) at maybeClose (child_process.js:1015:16) at Process.ChildProcess._handle.onexit (child_process.js:1087:5) 

I read this bolog post, and although its suggestion makes sense, I don’t have a duplicate file, which, according to him, I should see when I open my .pbxproj file.

https://medium.com/@_qzapaia/cordova-ionic-ios-build-error-697a7ec5b46#.snruarnmz

If I create my project for the second time, it builds correctly, so I'm not sure what causes this from time to time. Any clues from anyone?

Greetings

+5
source share
2 answers

Run (this will remove the old ios ion platform)

 sudo ionic platform rm ios 

Then (this will install the new privileged platform)

 sudo ionic platform add ios 

Then create your ios / android code

 ionic build ios ionic build android 

It fixed it for me!

+3
source

I had the same problem as three days, and I just solved it for myself. My problem was that I used Xcode 7.1 and apparently there was something in this version that was causing the compiler problem.

Decision:

  • I uninstalled Xcode 7.1 by removing the application from the My Applications folder.

  • I went to this page and downloaded Xcode 6.4 instead.

After switching to Xcode 6.4, I was able to create for ios without any problems.

-1
source

Source: https://habr.com/ru/post/1234662/


All Articles