PhoneGap 2.0 – Getting Started

As you may already know PhoneGap 2.0 was released last Friday. This is a major release that brings some new features and lots of changes around the way you create and setup your development environment. For example to create a new iOS/PhoneGap project you don’t use a wizard from Xcode anymore; now you need to launch a bash script from command line. Below you will find two short video tutorials that demonstrate how to get started for both Android and iOS platforms. Also after the videos you can find some additional steps that I had to go through in order to get everything running properly. I know these steps may not be necessary for all. I’ve tested it also on my colleague’s less polluted Mac and everything worked out of the box 😉

iOS tutorial

Android tutorial

iOS additional steps

1) Remember to get Xcode Command Line Tools installed, using the Install button next to the Preferences > Downloads > Components > Command Line Tools option.

2) If you happen to get the following error:
Error: No developer directory found at /Developer. Run /usr/bin/xcode-select to update the developer directory path.

You can fix it by the invoking following command, with the path after the -switch parameter pointing to where you have Xcode installed:
sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer

3) If you want to run iOS Simulator from the command line you will need to install the ios-sim app that is available on GitHub. Not having ios-sim may also result with a following error in a console when running a debug script:

Error: ios-sim was not found. Please download, build and install version 1.4 or greater from https://github.com/phonegap/ios-sim into your path. Or “brew install ios-sim” using homebrew: http://mxcl.github.com/homebrew/

The easiest way to install ios-sim is to use homebrew. To install homebrew you either follow the instruction on its website, or just invoke the following script:

/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"

After homebrew is installed you may want to run its doctor function to verify that everything was setup correctly: brew doctor

If brew doctor says everything is alright just run this: brew install ios-sim

4) UPDATE 27.07.2012: You may wonder why the size of iOS projects has grown significantly to something like ~15MB. This is because starting from PhoneGap 2.0 a default project contains assets like splash screens and icons for new iPad Retina displays. So if you are not targeting these new devices make sure you remove these assets and you should be back to something like 1+ MB 😉

Android additional steps

1) With Android the most important thing to do before running any of the new command line scripts is to download and install Android SDK, and to add the tools and platform-tools folders to the PATH environment variable. This can be done with following statement (of course correct it to match your folder structure):
export PATH=$PATH:~/Android/sdk/android-sdk-macosx/tools/:~/Android/sdk/android-sdk-macosx/platform-tools/

2) If you happen to have Android 2.2 SDK installed and configured as your default target you may want to delete the xlargeScreens attribute from AndroidManifest.xml. This happened to me and I got following error:

Add SDK version that has support of xlargeScreens, (I believe that should be any starting from 3.x)
/Users/pwalczys/Projects/PG2/android/bin/AndroidManifest.xml:22: error: No resource identifier found for attribute 'xlargeScreens' in package 'android'



45 comments

  1. Pingback: Improvements in Cordova 2.0.0 for iOS « Shazron's Cordova (aka PhoneGap) Blog
  2. cage.chung

    Hi, Piotr.

    An awesome tutorial video to getting stated PhoneGap 2.0. But, when in try to debug by ios-sim. I got an “error: /VERSION: No such file or directory” error. Someone got some error message when they build project on Xcode (http://goo.gl/eF9F5), but i am doing OK on Xcode. Could you do my a favor? Which step was wrong. Thanks a lot.

    • Piotr

      Hi Cage,
      It looks to me like it can’t find installed Cordova library/project which should be in your users Documents directory and named something like CordovaLib.

      p.

  3. rrojas

    Piotr,
    Great tutorial. Quite helpful.
    Looking forward to the Cordova/PhoneGap 2.x PhpStorm configuration tutorial.

    – Roberto

  4. Rex

    I have just installed phone gap 2.0 and created a new project. I replaced all of the www files with my own project from dreamweaver. I opened the project in Xcode and ran it in the simulator. It works fine, except that the icons and splash screen are cordova images, not the images from my project. I have removed every instance of cordova icons and splash screens from the Xcode project and replaced them with my own images, but still the cordova icons and splash screens persist when I open the simulator. How do I get rid of the cordova icons and splash images?

  5. Max

    Hi Piotr,

    Good tutorial thank you!

    But I’ve got a problem trying to build it with command line: it says that build succeeded without error but doesn’t launch ios simulator.
    I’m on MacOSX Lion, XCode 4.4 and ios-sim 1.5 .

    Thank You!

  6. John

    I had the VERSION problem mention above, file simply didn’t exist, created a plain text file in CordovaLib called VERSION with simply 2.0 inside

  7. Pingback: PhoneGap Community Roundup – July 2012 | SDK News
  8. lalsomde

    Sorry I might miss something but this is what I get when I try to start a projet…

    Last login: Mon Aug 13 02:20:19 on ttys000
    Mariuss-MacBook-Pro:bin Lalsomde$ ./create -/Desktop/marius/app com.helloworld HelloWorld
    cp: -/Desktop/marius/app: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project/: unable to copy extended attributes to -/Desktop/marius/app: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//__TESTING__: unable to copy extended attributes to -/Desktop/marius/app/__TESTING__: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/.gitignore: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/__TESTING__-Info.plist: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/__TESTING__-Prefix.pch: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Classes: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//__TESTING__/Classes: unable to copy extended attributes to -/Desktop/marius/app/__TESTING__/Classes: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Classes/AppDelegate.h: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Classes/AppDelegate.m: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Classes/MainViewController.h: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Classes/MainViewController.m: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Classes/MainViewController.xib: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Cordova.plist: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/CordovaBuildSettings.xcconfig: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/main.m: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Plugins: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//__TESTING__/Plugins: unable to copy extended attributes to -/Desktop/marius/app/__TESTING__/Plugins: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Plugins/README: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//__TESTING__/Resources: unable to copy extended attributes to -/Desktop/marius/app/__TESTING__/Resources: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//__TESTING__/Resources/Capture.bundle: unable to copy extended attributes to -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/controls_bg.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/controls_bg@2x.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/controls_bg@2x~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/controls_bg~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/microphone.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/microphone@2x.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/microphone@2x~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/microphone~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/record_button.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/record_button@2x.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/record_button@2x~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/record_button~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/recording_bg.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/recording_bg@2x.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/recording_bg@2x~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/recording_bg~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/stop_button.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/stop_button@2x.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/stop_button@2x~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/stop_button~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/de.lproj: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//__TESTING__/Resources/de.lproj: unable to copy extended attributes to -/Desktop/marius/app/__TESTING__/Resources/de.lproj: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/de.lproj/Localizable.strings: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/en.lproj: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//__TESTING__/Resources/en.lproj: unable to copy extended attributes to -/Desktop/marius/app/__TESTING__/Resources/en.lproj: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/en.lproj/Localizable.strings: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/es.lproj: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//__TESTING__/Resources/es.lproj: unable to copy extended attributes to -/Desktop/marius/app/__TESTING__/Resources/es.lproj: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/es.lproj/Localizable.strings: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/icons: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//__TESTING__/Resources/icons: unable to copy extended attributes to -/Desktop/marius/app/__TESTING__/Resources/icons: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/icons/icon-72.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/icons/icon-72@2x.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/icons/icon.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/icons/icon@2x.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/se.lproj: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//__TESTING__/Resources/se.lproj: unable to copy extended attributes to -/Desktop/marius/app/__TESTING__/Resources/se.lproj: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/se.lproj/Localizable.strings: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/splash: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//__TESTING__/Resources/splash: unable to copy extended attributes to -/Desktop/marius/app/__TESTING__/Resources/splash: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/splash/Default-Landscape@2x~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/splash/Default-Landscape~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/splash/Default-Portrait@2x~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/splash/Default-Portrait~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/splash/Default@2x~iphone.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/splash/Default~iphone.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__.xcodeproj: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//__TESTING__.xcodeproj: unable to copy extended attributes to -/Desktop/marius/app/__TESTING__.xcodeproj: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__.xcodeproj/project.pbxproj: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__.xcodeproj/TemplateIcon.icns: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__.xcodeproj/TemplateInfo.plist: No such file or directory
    cp: -/Desktop/marius/app/cordova: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//cordova: unable to copy extended attributes to -/Desktop/marius/app/cordova: No such file or directory
    cp: -/Desktop/marius/app/cordova/debug: No such file or directory
    cp: -/Desktop/marius/app/cordova/emulate: No such file or directory
    cp: -/Desktop/marius/app/cordova/log: No such file or directory
    cp: -/Desktop/marius/app/www: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//www: unable to copy extended attributes to -/Desktop/marius/app/www: No such file or directory
    cp: -/Desktop/marius/app/www/config.xml: No such file or directory
    cp: -/Desktop/marius/app/www/cordova-2.0.0.js: No such file or directory
    cp: -/Desktop/marius/app/www/css: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//www/css: unable to copy extended attributes to -/Desktop/marius/app/www/css: No such file or directory
    cp: -/Desktop/marius/app/www/css/index.css: No such file or directory
    cp: -/Desktop/marius/app/www/img: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//www/img: unable to copy extended attributes to -/Desktop/marius/app/www/img: No such file or directory
    cp: -/Desktop/marius/app/www/img/cordova.png: No such file or directory
    cp: -/Desktop/marius/app/www/index.html: No such file or directory
    cp: -/Desktop/marius/app/www/js: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//www/js: unable to copy extended attributes to -/Desktop/marius/app/www/js: No such file or directory
    cp: -/Desktop/marius/app/www/js/index.js: No such file or directory
    cp: -/Desktop/marius/app/www/res: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//www/res: unable to copy extended attributes to -/Desktop/marius/app/www/res: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//www/res/icon: unable to copy extended attributes to -/Desktop/marius/app/www/res/icon: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_128.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_16.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_24.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_256.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_32.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_48.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_512.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_64.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_android_36.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_android_48.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_android_72.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_android_96.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_bb_80.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_ios_114.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_ios_144.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_ios_57.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_ios_72.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//www/res/screen: unable to copy extended attributes to -/Desktop/marius/app/www/res/screen: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/android_hdpi_landscape.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/android_hdpi_portrait.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/android_ldpi_landscape.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/android_ldpi_portrait.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/android_mdpi_landscape.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/android_mdpi_portrait.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/android_xhdpi_landscape.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/android_xhdpi_portrait.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/blackberry_transparent_300.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/blackberry_transparent_400.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/ipad_landscape.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/ipad_portrait.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/ipad_retina_landscape.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/ipad_retina_portrait.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/iphone_landscape.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/iphone_portrait.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/iphone_retina_landscape.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/iphone_retina_portrait.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/windows_phone_portrait.jpg: No such file or directory
    cp: -/Desktop/marius/app/www/spec: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//www/spec: unable to copy extended attributes to -/Desktop/marius/app/www/spec: No such file or directory
    cp: -/Desktop/marius/app/www/spec/helper.js: No such file or directory
    cp: -/Desktop/marius/app/www/spec/index.js: No such file or directory
    cp: -/Desktop/marius/app/www/spec.html: No such file or directory
    Mariuss-MacBook-Pro:bin Lalsomde$
    Please help…….

    • Jony

      lalsomde,

      Does the ‘Marius’ folder exist? If not, create it and try again. This was the problem I had, and creating the folder first fixed it.

  9. lalsomde

    This is what I get when trying to start a new project…Please Help…..

    Last login: Mon Aug 13 02:20:19 on ttys000
    Mariuss-MacBook-Pro:bin Lalsomde$ ./create -/Desktop/marius/app com.helloworld HelloWorld
    cp: -/Desktop/marius/app: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project/: unable to copy extended attributes to -/Desktop/marius/app: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//__TESTING__: unable to copy extended attributes to -/Desktop/marius/app/__TESTING__: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/.gitignore: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/__TESTING__-Info.plist: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/__TESTING__-Prefix.pch: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Classes: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//__TESTING__/Classes: unable to copy extended attributes to -/Desktop/marius/app/__TESTING__/Classes: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Classes/AppDelegate.h: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Classes/AppDelegate.m: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Classes/MainViewController.h: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Classes/MainViewController.m: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Classes/MainViewController.xib: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Cordova.plist: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/CordovaBuildSettings.xcconfig: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/main.m: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Plugins: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//__TESTING__/Plugins: unable to copy extended attributes to -/Desktop/marius/app/__TESTING__/Plugins: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Plugins/README: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//__TESTING__/Resources: unable to copy extended attributes to -/Desktop/marius/app/__TESTING__/Resources: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//__TESTING__/Resources/Capture.bundle: unable to copy extended attributes to -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/controls_bg.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/controls_bg@2x.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/controls_bg@2x~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/controls_bg~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/microphone.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/microphone@2x.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/microphone@2x~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/microphone~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/record_button.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/record_button@2x.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/record_button@2x~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/record_button~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/recording_bg.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/recording_bg@2x.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/recording_bg@2x~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/recording_bg~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/stop_button.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/stop_button@2x.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/stop_button@2x~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/Capture.bundle/stop_button~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/de.lproj: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//__TESTING__/Resources/de.lproj: unable to copy extended attributes to -/Desktop/marius/app/__TESTING__/Resources/de.lproj: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/de.lproj/Localizable.strings: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/en.lproj: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//__TESTING__/Resources/en.lproj: unable to copy extended attributes to -/Desktop/marius/app/__TESTING__/Resources/en.lproj: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/en.lproj/Localizable.strings: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/es.lproj: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//__TESTING__/Resources/es.lproj: unable to copy extended attributes to -/Desktop/marius/app/__TESTING__/Resources/es.lproj: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/es.lproj/Localizable.strings: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/icons: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//__TESTING__/Resources/icons: unable to copy extended attributes to -/Desktop/marius/app/__TESTING__/Resources/icons: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/icons/icon-72.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/icons/icon-72@2x.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/icons/icon.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/icons/icon@2x.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/se.lproj: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//__TESTING__/Resources/se.lproj: unable to copy extended attributes to -/Desktop/marius/app/__TESTING__/Resources/se.lproj: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/se.lproj/Localizable.strings: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/splash: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//__TESTING__/Resources/splash: unable to copy extended attributes to -/Desktop/marius/app/__TESTING__/Resources/splash: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/splash/Default-Landscape@2x~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/splash/Default-Landscape~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/splash/Default-Portrait@2x~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/splash/Default-Portrait~ipad.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/splash/Default@2x~iphone.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__/Resources/splash/Default~iphone.png: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__.xcodeproj: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//__TESTING__.xcodeproj: unable to copy extended attributes to -/Desktop/marius/app/__TESTING__.xcodeproj: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__.xcodeproj/project.pbxproj: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__.xcodeproj/TemplateIcon.icns: No such file or directory
    cp: -/Desktop/marius/app/__TESTING__.xcodeproj/TemplateInfo.plist: No such file or directory
    cp: -/Desktop/marius/app/cordova: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//cordova: unable to copy extended attributes to -/Desktop/marius/app/cordova: No such file or directory
    cp: -/Desktop/marius/app/cordova/debug: No such file or directory
    cp: -/Desktop/marius/app/cordova/emulate: No such file or directory
    cp: -/Desktop/marius/app/cordova/log: No such file or directory
    cp: -/Desktop/marius/app/www: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//www: unable to copy extended attributes to -/Desktop/marius/app/www: No such file or directory
    cp: -/Desktop/marius/app/www/config.xml: No such file or directory
    cp: -/Desktop/marius/app/www/cordova-2.0.0.js: No such file or directory
    cp: -/Desktop/marius/app/www/css: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//www/css: unable to copy extended attributes to -/Desktop/marius/app/www/css: No such file or directory
    cp: -/Desktop/marius/app/www/css/index.css: No such file or directory
    cp: -/Desktop/marius/app/www/img: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//www/img: unable to copy extended attributes to -/Desktop/marius/app/www/img: No such file or directory
    cp: -/Desktop/marius/app/www/img/cordova.png: No such file or directory
    cp: -/Desktop/marius/app/www/index.html: No such file or directory
    cp: -/Desktop/marius/app/www/js: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//www/js: unable to copy extended attributes to -/Desktop/marius/app/www/js: No such file or directory
    cp: -/Desktop/marius/app/www/js/index.js: No such file or directory
    cp: -/Desktop/marius/app/www/res: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//www/res: unable to copy extended attributes to -/Desktop/marius/app/www/res: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//www/res/icon: unable to copy extended attributes to -/Desktop/marius/app/www/res/icon: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_128.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_16.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_24.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_256.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_32.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_48.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_512.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_64.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_android_36.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_android_48.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_android_72.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_android_96.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_bb_80.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_ios_114.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_ios_144.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_ios_57.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/icon/cordova_ios_72.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//www/res/screen: unable to copy extended attributes to -/Desktop/marius/app/www/res/screen: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/android_hdpi_landscape.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/android_hdpi_portrait.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/android_ldpi_landscape.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/android_ldpi_portrait.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/android_mdpi_landscape.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/android_mdpi_portrait.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/android_xhdpi_landscape.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/android_xhdpi_portrait.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/blackberry_transparent_300.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/blackberry_transparent_400.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/ipad_landscape.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/ipad_portrait.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/ipad_retina_landscape.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/ipad_retina_portrait.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/iphone_landscape.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/iphone_portrait.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/iphone_retina_landscape.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/iphone_retina_portrait.png: No such file or directory
    cp: -/Desktop/marius/app/www/res/screen/windows_phone_portrait.jpg: No such file or directory
    cp: -/Desktop/marius/app/www/spec: No such file or directory
    cp: /Volumes/Cordova-2.0.0/bin/templates/project//www/spec: unable to copy extended attributes to -/Desktop/marius/app/www/spec: No such file or directory
    cp: -/Desktop/marius/app/www/spec/helper.js: No such file or directory
    cp: -/Desktop/marius/app/www/spec/index.js: No such file or directory
    cp: -/Desktop/marius/app/www/spec.html: No such file or directory
    Mariuss-MacBook-Pro:bin Lalsomde$

    • Piotr

      @lalsomde from what you posted I see you are using – sign instead of ~ sign in the path.
      ./create /Desktop/marius/app com.helloworld HelloWorld

  10. Rana

    Thanks a lot for this is very simple clear tutorial.
    Unfortunately I have a problem, when I create the project using terminal: ./create ~Desktop/StudyApp org.studyAppPhaseI StudyAppphaseI ,,,, this is the output that’s displayed:
    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

    And nothing is created at the folder itself.
    DO you know why does this happen ?

      • Rana

        Yes, you are right. I guess this was supposed to fix the problem, but now when I enter anything (even ./create alone), the output is : An error occured. Deleting project…
        Do you think something should be removed to fix this problem ?
        Thanks a lot.

    • Andreas

      I’m experiencing the exact same problem. Trying to run:
      bureaukraut:bin Andreas$ ./create ~/Desktop/Apputveckling/Projekt/GrafiFoto/ios com.Test Test

      And all i get 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

      I run Xcode 4.4.1 on OS X Mountain Lion (10.8.1). I have command line tools installed in Xcode.

  11. rafael

    on runtime appears debug messages, by example if you enable location plugin, automatically the app request user location authorization yet i dont have code with getCurrentLocation calls.
    Greetings nice tutorial.

  12. rafael

    sorry i forgot write the messages:
    2012-08-16 11:29:03.869 shareroute2[10732:707] PluginResult:toJSONString – {“status”:1,”message”:”wifi”,”keepCallback”:false}
    How can i disable this messages, or calling to geolocation. I wish authorization request appears when my code call it, not automatically.

  13. Pingback: PhoneGap 2.0 | spaghetti-ux.org
  14. Libert Link

    Hi, i install cordova 2 did startup the terminal on my mac drag the bin folder into the terminal and get this: MacBook-van-Ron-Jacobs:~ ronjacobs$ /Users/ronjacobs/bin
    -bash: /Users/ronjacobs/bin: is a directory
    please need some help
    or a good starter video tutorial .

    Thanks in advance

  15. Peter

    Hi Piotr,

    Thanks for your tutorial.
    But… of course I have a question.

    Everything in your video works as you explained except the iOS-sim. The iOS-sim does not launch after the debug script. Here is part of the output I get in the Terminal:

    2 warnings generated.

    Ld cordova/../build/HelloWorld.app/HelloWorld normal i386
    cd /Users/user/Projects/PG2/ios
    setenv MACOSX_DEPLOYMENT_TARGET 10.6
    setenv PATH “/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin”
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/user/Projects/PG2/ios/cordova/../build -F/Users/user/Projects/PG2/ios/cordova/../build -filelist /Users/user/Projects/PG2/ios/build/HelloWorld.build/Debug-iphonesimulator/HelloWorld.build/Objects-normal/i386/HelloWorld.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -all_load -Obj-C -fobjc-link-runtime -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=40200 /Users/user/Projects/PG2/ios/build/libCordova.a -framework Foundation -weak_framework UIKit -framework CoreGraphics -framework AddressBook -framework AddressBookUI -framework AudioToolbox -weak_framework AVFoundation -framework CFNetwork -framework CoreLocation -framework MediaPlayer -framework QuartzCore -framework SystemConfiguration -framework MobileCoreServices -weak_framework CoreMedia -o /Users/user/Projects/PG2/ios/cordova/../build/HelloWorld.app/HelloWorld

    GenerateDSYMFile cordova/../build/HelloWorld.app.dSYM cordova/../build/HelloWorld.app/HelloWorld
    cd /Users/user/Projects/PG2/ios
    setenv PATH “/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin”
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil /Users/user/Projects/PG2/ios/cordova/../build/HelloWorld.app/HelloWorld -o /Users/user/Projects/PG2/ios/cordova/../build/HelloWorld.app.dSYM

    Touch cordova/../build/HelloWorld.app
    cd /Users/user/Projects/PG2/ios
    setenv PATH “/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin”
    /usr/bin/touch -c /Users/user/Projects/PG2/ios/cordova/../build/HelloWorld.app

    ** BUILD SUCCEEDED **

    Any idea what the problem could be?

    Cheers,
    Pieter

  16. Andrew

    I get this error when I use the Terminal app…
    ./create ~/Desktop/PlayingDad/test3 com.playingdad.HelloWorld HelloWorld
    /Volumes/Cordova-2.0.0/bin/replaces: line 28: tmpFile: Read-only file system
    mv: tmpFile: No such file or directory
    I can’t figure out why it’s saying no such file or directory…it actually creates the xcodeproject…but a lot of the files and references in Xcode are still referencing __Testing__ instead of HelloWorld…like it got part way through the creation process when it got that error and didn’t finish
    any help?

  17. tymoss

    First of all I want to say its a great tutorial. The iOS version works for me but when I try to do the android I get this message.

    An error occured. Deleting project...

    Any help would be appreciated. I have the android SDK installed on my machine and it runs without any errors

    • Piotr

      Make sure you have Android SDK platform and platform-tools directories in your PATH, it is not enough to have it just installed.

      On Mac or Linux the line below should work, I’m not sure what you have to do on Windows but I guess something similar 😉
      export PATH=$PATH:~/Android/sdk/android-sdk-macosx/tools/:~/Android/sdk/android-sdk-macosx/platform-tools/

      p.

      • tymoss

        Thanks Piotr for the reply. This is what I noticed after I did what you recommended.

        Tawheeds-MacBook-Pro:~ tawheedabdul-raheem$ export PATH=$PATH:~/Android/sdk/android-sdk-macosx/tools/:~/Android/sdk/android-sdk-macosx/platform-tools/
        Tawheeds-MacBook-Pro:~ tawheedabdul-raheem$
        /Users/tawheedabdul-raheem/Downloads/phonegap-phonegap-2dbbdab/lib/android/bin
        Tawheeds-MacBook-Pro:bin tawheedabdul-raheem$ ./create /Users/Tawheed/Desktop/app com.app proj
        An error occured. Deleting project...
        Tawheeds-MacBook-Pro:bin tawheedabdul-raheem$

        • Rana

          Open Eclipse – Help – Install New Software – Available Software Sites – Android
          Then Check where your android Sdk is located ….
          Replace “~/Android/sdk/android-sdk-macosx/” with your location and it should work find =)

      • Adnan Basar

        Merts-MacBook-Pro:bin macbook$ export PATH=$PATH:/Users/macbook/android-sdks/tools/:/Users/macbook/android-sdks/platform-tools/
        Merts-MacBook-Pro:bin macbook$ ./create ~/Desktop/adnan com.example Hello
        Project already exists! Delete and recreate
        Merts-MacBook-Pro:bin macbook$

  18. Howard

    Hi Piotr,
    I followed the instructions carefully. At first I got an error indicating the CordovaLib.xcodeproj not found. It was in /users/hsmith825/Development/CordovaLib as it should be and the source tree entry in Xcode preferences was set correctly. Finally, I moved all my files and Cordova CordovaLib to trash and remove the sourcetree entry in preferences. I reinstalled Cordova 2.0.0. Now the install does not reinstall the CordovaLib.

    I have spend many hours trying to get the startup to work. I have no idea what to do.
    What would you suggest?
    Any help is appreciated.
    Thanks!
    Howard

  19. Snappy

    I got an error when I wants to start the app in emulator in Xcode.

    I also tried this through ios-sim, but also fails.
    Do you know whats the problem is and can you help me out?

    here is a part of the code in my terminal through ./debug code:

    rocessPCH /var/folders/k1/kgpb7y_j5jb0w8kmcqh8v9br0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Test-Prefix-gvoddegcanziihfiynifhqyypsbt/Test-Prefix.pch.pth Test/Test-Prefix.pch normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /PhoneGap_Projects/Test
    setenv LANG en_US.US-ASCII
    setenv PATH “/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/SenchaSDK:/Sencha:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin”
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c-header -arch i386 -fmessage-length=0 -std=c99 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wno-receiver-is-weak -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-sign-compare -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -fexceptions -fasm-blocks -Wprotocol -Wdeprecated-declarations -mmacosx-version-min=10.6 -g -fvisibility=hidden -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch “-DIBOutlet=__attribute__((iboutlet))” “-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))” “-DIBAction=void)__attribute__((ibaction)” -D__IPHONE_OS_VERSION_MIN_REQUIRED=40200 -iquote /PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Test-generated-files.hmap -I/PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Test-own-target-headers.hmap -I/PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Test-all-target-headers.hmap -iquote /PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Test-project-headers.hmap -I/PhoneGap_Projects/Test/cordova/../build/include -I/PhoneGap_Projects/Test/cordova/../build/usr/local/lib/include -I/PhoneGap_Projects/Test/build/UninstalledProducts/include -I/PhoneGap_Projects/Test/cordova/../build -I/PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/DerivedSources/i386 -I/PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/DerivedSources -F/PhoneGap_Projects/Test/cordova/../build –serialize-diagnostics /var/folders/k1/kgpb7y_j5jb0w8kmcqh8v9br0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Test-Prefix-gvoddegcanziihfiynifhqyypsbt/Test-Prefix.pch.dia -c /PhoneGap_Projects/Test/Test/Test-Prefix.pch -o /var/folders/k1/kgpb7y_j5jb0w8kmcqh8v9br0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Test-Prefix-gvoddegcanziihfiynifhqyypsbt/Test-Prefix.pch.pth -MMD -MT dependencies -MF /var/folders/k1/kgpb7y_j5jb0w8kmcqh8v9br0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Test-Prefix-gvoddegcanziihfiynifhqyypsbt/Test-Prefix.pch.d

    CompileC build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/MainViewController.o Test/Classes/MainViewController.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /PhoneGap_Projects/Test
    setenv LANG en_US.US-ASCII
    setenv PATH “/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/SenchaSDK:/Sencha:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin”
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch i386 -fmessage-length=0 -std=c99 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wno-receiver-is-weak -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-sign-compare -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -fexceptions -fasm-blocks -Wprotocol -Wdeprecated-declarations -mmacosx-version-min=10.6 -g -fvisibility=hidden -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch “-DIBOutlet=__attribute__((iboutlet))” “-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))” “-DIBAction=void)__attribute__((ibaction)” -D__IPHONE_OS_VERSION_MIN_REQUIRED=40200 -iquote /PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Test-generated-files.hmap -I/PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Test-own-target-headers.hmap -I/PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Test-all-target-headers.hmap -iquote /PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Test-project-headers.hmap -I/PhoneGap_Projects/Test/cordova/../build/include -I/PhoneGap_Projects/Test/cordova/../build/usr/local/lib/include -I/PhoneGap_Projects/Test/build/UninstalledProducts/include -I/PhoneGap_Projects/Test/cordova/../build -I/PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/DerivedSources/i386 -I/PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/DerivedSources -F/PhoneGap_Projects/Test/cordova/../build -include /var/folders/k1/kgpb7y_j5jb0w8kmcqh8v9br0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Test-Prefix-gvoddegcanziihfiynifhqyypsbt/Test-Prefix.pch -MMD -MT dependencies -MF /PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/MainViewController.d –serialize-diagnostics /PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/MainViewController.dia -c /PhoneGap_Projects/Test/Test/Classes/MainViewController.m -o /PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/MainViewController.o
    In file included from /PhoneGap_Projects/Test/Test/Classes/MainViewController.m:28:
    /PhoneGap_Projects/Test/Test/Classes/MainViewController.h:28:9: fatal error: ‘Cordova/CDVViewController.h’ file not found
    #import
    ^
    1 error generated.

    CompileC build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/main.o Test/main.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /PhoneGap_Projects/Test
    setenv LANG en_US.US-ASCII
    setenv PATH “/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/SenchaSDK:/Sencha:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin”
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch i386 -fmessage-length=0 -std=c99 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wno-receiver-is-weak -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-sign-compare -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -fexceptions -fasm-blocks -Wprotocol -Wdeprecated-declarations -mmacosx-version-min=10.6 -g -fvisibility=hidden -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch “-DIBOutlet=__attribute__((iboutlet))” “-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))” “-DIBAction=void)__attribute__((ibaction)” -D__IPHONE_OS_VERSION_MIN_REQUIRED=40200 -iquote /PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Test-generated-files.hmap -I/PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Test-own-target-headers.hmap -I/PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Test-all-target-headers.hmap -iquote /PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Test-project-headers.hmap -I/PhoneGap_Projects/Test/cordova/../build/include -I/PhoneGap_Projects/Test/cordova/../build/usr/local/lib/include -I/PhoneGap_Projects/Test/build/UninstalledProducts/include -I/PhoneGap_Projects/Test/cordova/../build -I/PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/DerivedSources/i386 -I/PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/DerivedSources -F/PhoneGap_Projects/Test/cordova/../build -include /var/folders/k1/kgpb7y_j5jb0w8kmcqh8v9br0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Test-Prefix-gvoddegcanziihfiynifhqyypsbt/Test-Prefix.pch -MMD -MT dependencies -MF /PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/main.d –serialize-diagnostics /PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/main.dia -c /PhoneGap_Projects/Test/Test/main.m -o /PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/main.o

    CompileC build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/AppDelegate.o Test/Classes/AppDelegate.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /PhoneGap_Projects/Test
    setenv LANG en_US.US-ASCII
    setenv PATH “/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/SenchaSDK:/Sencha:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin”
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch i386 -fmessage-length=0 -std=c99 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wno-receiver-is-weak -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-sign-compare -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -fexceptions -fasm-blocks -Wprotocol -Wdeprecated-declarations -mmacosx-version-min=10.6 -g -fvisibility=hidden -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch “-DIBOutlet=__attribute__((iboutlet))” “-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))” “-DIBAction=void)__attribute__((ibaction)” -D__IPHONE_OS_VERSION_MIN_REQUIRED=40200 -iquote /PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Test-generated-files.hmap -I/PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Test-own-target-headers.hmap -I/PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Test-all-target-headers.hmap -iquote /PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Test-project-headers.hmap -I/PhoneGap_Projects/Test/cordova/../build/include -I/PhoneGap_Projects/Test/cordova/../build/usr/local/lib/include -I/PhoneGap_Projects/Test/build/UninstalledProducts/include -I/PhoneGap_Projects/Test/cordova/../build -I/PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/DerivedSources/i386 -I/PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/DerivedSources -F/PhoneGap_Projects/Test/cordova/../build -include /var/folders/k1/kgpb7y_j5jb0w8kmcqh8v9br0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/Test-Prefix-gvoddegcanziihfiynifhqyypsbt/Test-Prefix.pch -MMD -MT dependencies -MF /PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/AppDelegate.d –serialize-diagnostics /PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/AppDelegate.dia -c /PhoneGap_Projects/Test/Test/Classes/AppDelegate.m -o /PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/AppDelegate.o
    In file included from /PhoneGap_Projects/Test/Test/Classes/AppDelegate.m:28:
    /PhoneGap_Projects/Test/Test/Classes/AppDelegate.h:30:9: fatal error: ‘Cordova/CDVViewController.h’ file not found
    #import
    ^
    1 error generated.

    2012-09-08 09:58:10.662 xcodebuild[25970:313] DVTAssertions: Warning in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-1559/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/SpecificationTypes/XCGccMakefileDependencies.m:87
    Details: Failed to load dependencies output contents from “/PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/AppDelegate.d”. Error: Error Domain=NSCocoaErrorDomain Code=260 “The file “AppDelegate.d” couldn’t be opened because there is no such file.” UserInfo=0x4001ad580 {NSFilePath=/PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/AppDelegate.d, NSUnderlyingError=0x4001cbf60 “The operation couldn’t be completed. No such file or directory”}. User info: {
    NSFilePath = “/PhoneGap_Projects/Test/build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/AppDelegate.d”;
    NSUnderlyingError = “Error Domain=NSPOSIXErrorDomain Code=2 \”The operation couldn\U2019t be completed. No such file or directory\””;
    }.
    Function: void XCGccMakefileDependenciesParsePathsFromRuleFile(NSString *, void (^)(NSString *))
    Thread: {name = (null), num = 7}
    Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.

    ** BUILD FAILED **

    The following build commands failed:
    CompileC build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/MainViewController.o Test/Classes/MainViewController.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    CompileC build/Test.build/Debug-iphonesimulator/Test.build/Objects-normal/i386/AppDelegate.o Test/Classes/AppDelegate.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    (2 failures)

  20. Ike

    Unfortunately I am having this problem when I try to create:

    Ikes-Mac-mini:bin Ike DeL$ ./create ~/Desktop/starterApp org.StarterApp starterApp
    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
    Ikes-Mac-mini:bin Ike DeL$

    Any help appreciated.

    • Ike

      Ok. The reason this was happening appears to be a space in the resolved (actual) pathname due to space in the username. The home directory name has a space if the username has a space. Renaming the user and home directory so there is no space appears to fix this problem.

  21. Han

    Hello, Dear.

    Thanks for your good tutorial.
    I have one question. I have installed command line tools, but I can’t find button( >_< ) by Search box on toolbar.
    How can I see this button? What is this button's name?
    Help me.

    Regards.

  22. Marc

    Hi,

    I’m trying the new phonegap version. Finally I could create the project with the command line on Terminal. But when I Run the app to an initial test, in the Scheme appears __TESTING__ (My Mac 64-bit) or CordovaLib with iOS device, iPad and IPhone simulator, but no works. The question is, why my project name not appears on the scheme list?

    Help plz
    Thanks

  23. Anastasya

    Hallo, Im new with Xcode and Cordova (PhoneGap) I don’t know what I’m doing wrong… i have Xcode, and everything and i downloaded Cordova. first there was no installation .dmg so i downloaded 2.0 with .pkg included, i installed it.. than i should have the option in iOS Application to make new Cordova application, right?
    Well there isn’t.
    What am i doing wrong? I don’t get it? – i opend the “test” file included in the download and i can run it in Xcode and get it on the simulator and it says that Cordova is running…
    what am i doing wrong and how can i make a Cordova application in Xcode?

    Thank you for your answer..
    Anastasya

  24. Bob Vargas

    I got my first Phonegap (android) working. I’m using version 2.5. I don’t need to run ./debug command. Thanks for a great tutorial!

  25. Pingback: Links for 2012-07-26 [del.icio.us] | Ape the Mind
  26. Pingback: Links for 2012-07-26 [del.icio.us] | Our Digital Times
  27. Pingback: Links for 2012-07-26 [del.icio.us] | Our Digital Times
https://outof.me

Leave a Reply to cage.chung Cancel reply

You may use the following HTML:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>