Ionic build ios fails (android works)



I am having a strange problem, my ionic project builds just fine for android but fails for ios. I am stumped about how to proceed and was hoping that someone might have some ideas.

Host: Mac OS X 10.9.5 (Darwin 13.4.0)
Ionic: 1.2.6 (ionic --verson)
Cordova: 3.6.3-0.2.13 (cordova --version)
Xcode: 6.0.1 (xcodebuild -version)

The source of the problem seems to be this:

2014-10-01 13:34:44.881 xcodebuild[52954:2007] error: InputFile    /Users/jlinoff/work/apps/ShowMeTheSugar.joe/platforms/ios/Show Me The Sugar/Show Me The Sugar-Prefix.pch 0 1412035382 977 33188... malformed line 9; 'InputFile' should have exactly five arguments

The build failure message is:

The following build commands failed:
    CompileC build/Show\ Me\ The\\ Me\ The\ Show\ Me\ The\ Sugar/main.m normal i386 objective-c
    CompileC build/Show\ Me\ The\\ Me\ The\ Show\ Me\ The\ Sugar/Classes/AppDelegate.m normal i386 objective-c
(2 failures)
Error: /Users/jlinoff/work/apps/ShowMeTheSugar.joe/platforms/ios/cordova/build: Command failed with exit code 65
    at ChildProcess.whenDone (/opt/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:756:16)
    at Process.ChildProcess._handle.onexit (child_process.js:823:5)

This is what I have tried so far:

  1. remove the ios platform (ionic platform remove ios), then re-add it
  2. remove all of the plugins and then re-add them.
  3. remove the plugins and all platforms and then re-add the plugins followed by the platforms
  4. compile within in xcode

So far nothing has worked. I am not sure what to next.

Can anyone suggest other things i can try to get ios building correctly?




Have you tried removing the spaces from your build path? I recently had build issues with iOS because of spaces.


Great suggestion. It worked. Thank you.


Hi did you remove space from the build path? It seems like the folder containing this PCH file is automatically generated based on app name. Is it possible to get it to build the app without changing app name?


Oh man, what a life saver. I had tried everything else.

Changed my app name in config.xml to remove spaces, and it built with no issues.



I had to change the app name in the config.xml file to get it working.