Creating iOS PhoneGap / Cordova 2.0 & Mountain Lion

PhoneGap 2.0 and Mountain Lion don’t get along too well when it comes to creating new iOS projects. If you’re getting the following (or similar errors):

usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
 cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory

Replace your current cordova bin file by downloading the latest bin as per the second step in the getting started guide.

If you’re interested in the problem:

The script has multiple points of failure if there are spaces anywhere in either the path to the extracted bin dir, or the path to the target. It seems that there is insufficient argument escaping when passing the derived variables, like $R, on to other scripts and program


I’m unsure why the official download doesn’t contain this fix.

3 thoughts on “Creating iOS PhoneGap / Cordova 2.0 & Mountain Lion

  1. Thanks Ben, been driving me nuts for a couple of hours.

Comments are closed.