0

I've been working on a Meteor project using Cordova to build an iOS app. It was working very smoothly for a while and then all of a sudden I started getting this error:

❯❯❯ meteor run ios         

Error while running for mobile platforms: Error running
/Users/chet/.meteor/packages/meteor-tool/.1.0.37.19du6bc++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/cordova-scripts/cordova.sh
2014-12-23 13:35:00.970 xcodebuild[46060:3143193] error: InputFile    /Users/chet/Code/meteor/5cmenu/.meteor/local/cordova-build/platforms/ios/5C Menu/5C
Menu-Prefix.pch 0 1418992636 959 33188... malformed line 9; 'InputFile' should have exactly five arguments

If I open the .xcodeproj in .meteor/local/cordova-build/platforms/ios/, the project runs just fine. However, its an old version of my meteor app.

I tried deleting .meteor/local, then meteor run ios. I get the same error. And when I opened the .xcodeproj, it worked when I tried running it.

I also tried meteor remove-platform ios then meteor add-platform ios. Then I ran meteor run ios. I get the same error, but again, when I opened the .xcodeproj, it worked.

Theres a similar [issue posted here](https://github.com/meteor/meteor/issues/3105 ).

A couple things I've tried are deleting the Xcode DerivedData folder, and cleaning my Xcode build cache for the project by running cmd+shift+K which seems totally unnecessary for this problem.

I also found a similar issue here that said this is a "non-fatal error".

Any ideas how to fix this problem?

Community
  • 1
  • 1
Chet
  • 18,421
  • 15
  • 69
  • 113

2 Answers2

1

So one of the ways reset your Xcode build is with rm -rf .meteor/local/. Then meteor run ios-device will build a new project. However, when you do this, you end up with his PCH error because of some sort of caching.

You'll find a path in your error that looks something like this

/var/folders/x5/mdr8syvj7lsb_sg_pr0j7y_h0000gn/C/com.apple.DeveloperTools/6.1.1-6A2008a/Xcode/SharedPrecompiledHeaders/

Notice the SharedPrecompiledHeaders part. Delete the app that starts with your app name. Then do this all over

rm -rf .meteor/local/
meteor run ios-device

Works every time

Chet
  • 18,421
  • 15
  • 69
  • 113
0

You have a space in your path, which is being interpreted as another argument.

/Users/chet/Code/meteor/5cmenu/.meteor/local/cordova-build/platforms/ios/5C Menu/5C

More info here: https://github.com/meteor/meteor/issues/3105#issuecomment-75580362