iosxcodecordovaphonegap-pluginscordova-3

Cordova, Error: does not appear to be an xcode project (no xcode project file) when installing plugins


I'm following the documentation trying to create a Cordova app for iOS. I'm using version 3.3 on OSX Maverick and here's what I did:

cordova create hello com.example.hello HelloWorld
cd hello
cordova platform add ios
cordova plugin add org.apache.cordova.device

at this point, cordova complained about missing xcode project:

Fetching plugin from "org.apache.cordova.device"...
Starting installation of "org.apache.cordova.device" for ios

/usr/local/lib/node_modules/cordova/node_modules/q/q.js:126
                    throw e;
                          ^
Error: does not appear to be an xcode project (no xcode project file)
    at Object.module.exports.parseProjectFile (/usr/local/lib/node_modules/cordova/node_modules/plugman/src/platforms/ios.js:143:19)
    at Object.ActionStack.process (/usr/local/lib/node_modules/cordova/node_modules/plugman/src/util/action-stack.js:34:49)
    at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/plugman/src/install.js:380:20)
    at /usr/local/lib/node_modules/cordova/node_modules/plugman/src/install.js:331:20
    at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:798:54)
    at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:827:30)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:760:13)
    at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:574:44
    at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)
    at process._tickCallback (node.js:415:13)

I'm wondering what I did wrong and how to resolve this problem?


Solution

  • I've figured it out. There are special characters in the path ([]), which may have caused trouble with file searching in nodejs. The error went away when the folder is moved to a location without such characters.