Q:

How to run phone gap with xcode4? 

Since moving to XCode4, I have been getting errors like:

/VERSION: No such file or directory 
cp: /javascripts/phonegap..js: No such file or directory 
cp: /javascripts/phonegap..min.js: No such file or directory 
error: /VERSION: No such file or directory

for projects that were working under XCode3.  

A:

Open XCodes Preferences, and navigate to Source Trees.  If there is no PhoneGapLib entry there, try adding a new setting with the following values:
Setting Name: PHONEGAPLIB
Display Name: Phone Gap Lib
Path: /Users//Documents/PhoneGapLib
Note that the path should be to the location of your PhoneGapLib folder, and that it may not be in your documents folder, depending on how you installed PhoneGap.