HomeBlogBooksProjectsArchiveAboutlogo

PhoneGap on iOS: an stupid advertisement using the "create" command line tool

11 September, 2012 - 2 min read

Some days ago I start my first mobile application. Nothing awesome, it is a simply excuse to test jQuery Mobile and PhoneGap frameworks.

This post is not oriented to describe my impressions, that would be another day, but describe an stupid headache I have when trying to install the PhoneGap framework in my MacOSX.

Lets go. I have coded my application like a normal web application, then I have follow the steps described here to install the PhoneGap with XCode. All right, now is the moment to set up my project with the create command line tool and... wait !!!

./create ~/Documents/Personal\ Projects/Viendo com.acanimal.Viendo Viendo

and the result is:

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

The create tool is a simple bash script that copies the content from template/project to the specified destination, see:

...
# copy the files in; then modify them
cp -R $BINDIR/templates/project $PROJECT_PATH
...

where $PROJECT_PATH points to the destination folder we have specified previously.

I tried to escape the command, add double quotes, etc without much success and finally my I'm-not-a-hacker-solution has been to change the name of the destination folder to PersonalProjects (without whitespaces) (Really I don't remember why I put a whitespace in the name I never use whitespaces in the names).

If any good command line user arrives here, please send me some alternative.

© I built this site withGatsbyfrom the starterjuliaand made a bunch of modifications. The full content is available in myrepository. Icons made byFreepik from Flaticon